mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-14 12:59:42 +02:00
Fix environment color editing
This commit is contained in:
@@ -11,16 +11,22 @@ export function EnvironmentColorPicker({
|
||||
}) {
|
||||
const [color, setColor] = useState<string | null>(defaultColor);
|
||||
return (
|
||||
<div className="flex flex-col items-stretch gap-3 pb-2 w-full">
|
||||
<form
|
||||
className="flex flex-col items-stretch gap-3 pb-2 w-full"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
onChange(color);
|
||||
}}
|
||||
>
|
||||
<ColorPicker color={color} onChange={setColor} />
|
||||
<div className="grid grid-cols-[1fr_1fr] gap-1.5">
|
||||
<Button variant="border" color="secondary" onClick={() => onChange(null)}>
|
||||
Clear
|
||||
</Button>
|
||||
<Button color="primary" onClick={() => onChange(color)}>
|
||||
<Button type="submit" color="primary">
|
||||
Save
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user