From b5c46a96ea2e16d76132574134e558e6b13e1f18 Mon Sep 17 00:00:00 2001 From: Gabber235 Date: Sat, 20 Jul 2024 08:09:13 +0200 Subject: [PATCH] Add Floatrange field --- .../src/components/EntryInspector/index.tsx | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/documentation/src/components/EntryInspector/index.tsx b/documentation/src/components/EntryInspector/index.tsx index 68e8a43b2e..b5df7541c1 100644 --- a/documentation/src/components/EntryInspector/index.tsx +++ b/documentation/src/components/EntryInspector/index.tsx @@ -384,6 +384,9 @@ function CustomFieldInspector({ /> ); } + if (editor === "floatRange") { + return ; + } return (
Unknown custom editor: {editor} @@ -698,3 +701,26 @@ function OptionalField({ value, field, path, pages }: OptionalFieldProps) {
); } + +type FloatRange = { start: number, end: number }; + +function FloatRangeField({ value, path }: { value: FloatRange, path: string }) { + const { start, end } = value; + return ( +
+ +
+ + +
+
+ ); +}