summaryrefslogtreecommitdiff
path: root/apps/web/src/components/editor/properties-panel/text-properties.tsx
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2025-07-10 21:52:46 +0200
committerMaze Winther <mazewinther@gmail.com>2025-07-10 21:52:46 +0200
commit7ec9167aebf16a5ba5956b0947fbf018c4340bd8 (patch)
tree7336b266f68074f693cc9b3261bfcc138994363c /apps/web/src/components/editor/properties-panel/text-properties.tsx
parentf984f615ce8bfba8193ad0cf85b1e4b32c5c2cf7 (diff)
downloadopencut-7ec9167aebf16a5ba5956b0947fbf018c4340bd8.tar.gz
refactor: new font picker component
Diffstat (limited to 'apps/web/src/components/editor/properties-panel/text-properties.tsx')
-rw-r--r--apps/web/src/components/editor/properties-panel/text-properties.tsx25
1 files changed, 4 insertions, 21 deletions
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 120ca954..37b8d748 100644
--- a/apps/web/src/components/editor/properties-panel/text-properties.tsx
+++ b/apps/web/src/components/editor/properties-panel/text-properties.tsx
@@ -1,12 +1,6 @@
import { Textarea } from "@/components/ui/textarea";
-import {
- Select,
- SelectContent,
- SelectItem,
- SelectTrigger,
- SelectValue,
-} from "@/components/ui/select";
-import { FONT_OPTIONS, FontFamily } from "@/constants/font-constants";
+import { FontPicker } from "@/components/ui/font-picker";
+import { FontFamily } from "@/constants/font-constants";
import { TextElement } from "@/types/timeline";
import { useTimelineStore } from "@/stores/timeline-store";
import { Slider } from "@/components/ui/slider";
@@ -39,23 +33,12 @@ export function TextProperties({
<PropertyItem direction="row">
<PropertyItemLabel>Font</PropertyItemLabel>
<PropertyItemValue>
- <Select
+ <FontPicker
defaultValue={element.fontFamily}
onValueChange={(value: FontFamily) =>
updateTextElement(trackId, element.id, { fontFamily: value })
}
- >
- <SelectTrigger className="w-full text-xs">
- <SelectValue placeholder="Select a font" />
- </SelectTrigger>
- <SelectContent>
- {FONT_OPTIONS.map((font) => (
- <SelectItem key={font.value} value={font.value}>
- {font.label}
- </SelectItem>
- ))}
- </SelectContent>
- </Select>
+ />
</PropertyItemValue>
</PropertyItem>
<PropertyItem direction="column">