mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 10:33:01 +00:00
added "asChild" for trigger and type="button", not submit
prevents dialogs being closed by accident
This commit is contained in:
@@ -12,8 +12,8 @@ export default function ColourPicker({
|
||||
}) {
|
||||
return (
|
||||
<Popover>
|
||||
<PopoverTrigger>
|
||||
<Button className="w-8 h-8" style={{ backgroundColor: colour }}></Button>
|
||||
<PopoverTrigger asChild>
|
||||
<Button type="button" className="w-8 h-8" style={{ backgroundColor: colour }} />
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-fit grid gap-2 p-2" align="start" side={"top"}>
|
||||
<HexColorPicker color={colour} onChange={onChange} className="p-0 m-0" />
|
||||
|
||||
Reference in New Issue
Block a user