mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02: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 (
|
return (
|
||||||
<Popover>
|
<Popover>
|
||||||
<PopoverTrigger>
|
<PopoverTrigger asChild>
|
||||||
<Button className="w-8 h-8" style={{ backgroundColor: colour }}></Button>
|
<Button type="button" className="w-8 h-8" style={{ backgroundColor: colour }} />
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
<PopoverContent className="w-fit grid gap-2 p-2" align="start" side={"top"}>
|
<PopoverContent className="w-fit grid gap-2 p-2" align="start" side={"top"}>
|
||||||
<HexColorPicker color={colour} onChange={onChange} className="p-0 m-0" />
|
<HexColorPicker color={colour} onChange={onChange} className="p-0 m-0" />
|
||||||
|
|||||||
Reference in New Issue
Block a user