Skip to content

Commit

Permalink
fix: ux for background selector
Browse files Browse the repository at this point in the history
  • Loading branch information
RavenColEvol committed Jan 29, 2024
1 parent a807d41 commit 6b6109e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/Editor/Forms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function ThemeForm() {
const [form,setFormState] = useFormState()!;
const [themes] = useState(THEMES);
const [backgroundOptions] = useState(() => BACKGROUNDS.map(background => ({
name: background,
label: background.charAt(0).toUpperCase() + background.slice(1),
value: background
})));

Expand All @@ -157,10 +157,15 @@ function ThemeForm() {
}
}));
}

return (
<>
<Form.Item label="Background" name="background">
<Select defaultValue={form.theme.background} onChange={handleChange} options={backgroundOptions} />
<Select
defaultValue={form.theme.background}
onChange={handleChange}
options={backgroundOptions}
/>
</Form.Item>
<div className="color-bar__container">
{themes.map((theme, idx) => (
Expand Down

0 comments on commit 6b6109e

Please sign in to comment.