From fe6492f359b245a22882adf49990052d3ca6830d Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Thu, 10 Jul 2025 21:48:26 +0200 Subject: refactor: separate property item component --- .../editor/properties-panel/text-properties.tsx | 104 +++++++++++---------- 1 file changed, 56 insertions(+), 48 deletions(-) (limited to 'apps/web/src/components/editor/properties-panel/text-properties.tsx') diff --git a/apps/web/src/components/editor/properties-panel/text-properties.tsx b/apps/web/src/components/editor/properties-panel/text-properties.tsx index c91e7cb8..66856d3b 100644 --- a/apps/web/src/components/editor/properties-panel/text-properties.tsx +++ b/apps/web/src/components/editor/properties-panel/text-properties.tsx @@ -1,5 +1,4 @@ import { Textarea } from "@/components/ui/textarea"; -import { Label } from "@/components/ui/label"; import { Select, SelectContent, @@ -12,6 +11,11 @@ import { TextElement } from "@/types/timeline"; import { useTimelineStore } from "@/stores/timeline-store"; import { Slider } from "@/components/ui/slider"; import { Input } from "@/components/ui/input"; +import { + PropertyItem, + PropertyItemLabel, + PropertyItemValue, +} from "./property-item"; export function TextProperties({ element, @@ -32,54 +36,58 @@ export function TextProperties({ updateTextElement(trackId, element.id, { content: e.target.value }) } /> -
- - -
-
- -
- - updateTextElement(trackId, element.id, { fontSize: value }) - } - className="w-full" - /> - - updateTextElement(trackId, element.id, { - fontSize: parseInt(e.target.value), - }) + + Font + + + + + + Font size + +
+ + updateTextElement(trackId, element.id, { fontSize: value }) + } + className="w-full" + /> + + updateTextElement(trackId, element.id, { + fontSize: parseInt(e.target.value), + }) + } + className="w-12 !text-xs h-7 rounded-sm text-center + [appearance:textfield] + [&::-webkit-outer-spin-button]:appearance-none + [&::-webkit-inner-spin-button]:appearance-none" + /> +
+
+
); } -- cgit v1.3.1