@@ -7,8 +7,6 @@ import type { DropdownMenuItemProps } from '@radix-ui/react-dropdown-menu';
7
7
import { cn } from '@udecode/cn' ;
8
8
import { Check } from 'lucide-react' ;
9
9
10
- import type { TColor } from './color-dropdown-menu' ;
11
-
12
10
import { buttonVariants } from './button' ;
13
11
import { DropdownMenuItem } from './dropdown-menu' ;
14
12
import {
@@ -18,6 +16,12 @@ import {
18
16
TooltipTrigger ,
19
17
} from './tooltip' ;
20
18
19
+ export type TColor = {
20
+ isBrightColor : boolean ;
21
+ name : string ;
22
+ value : string ;
23
+ } ;
24
+
21
25
type ColorDropdownMenuItemProps = {
22
26
isBrightColor : boolean ;
23
27
isSelected : boolean ;
@@ -42,8 +46,8 @@ export function ColorDropdownMenuItem({
42
46
isMenu : true ,
43
47
variant : 'outline' ,
44
48
} ) ,
45
- 'size-6 border border-solid border-muted p-0' ,
46
- ! isBrightColor && 'border-transparent text-white' ,
49
+ 'flex size-6 items-center justify-center rounded-full border border-solid border-muted p-0 transition-all hover:scale-125 ' ,
50
+ ! isBrightColor && 'border-transparent text-white hover:!text-white ' ,
47
51
className
48
52
) }
49
53
style = { { backgroundColor : value } }
@@ -53,14 +57,14 @@ export function ColorDropdownMenuItem({
53
57
} }
54
58
{ ...props }
55
59
>
56
- { isSelected ? < Check /> : null }
60
+ { isSelected ? < Check className = "size-3" /> : null }
57
61
</ DropdownMenuItem >
58
62
) ;
59
63
60
64
return name ? (
61
65
< Tooltip >
62
66
< TooltipTrigger > { content } </ TooltipTrigger >
63
- < TooltipContent > { name } </ TooltipContent >
67
+ < TooltipContent className = "mb-1 capitalize" > { name } </ TooltipContent >
64
68
</ Tooltip >
65
69
) : (
66
70
content
@@ -82,7 +86,10 @@ export function ColorDropdownMenuItems({
82
86
} : ColorDropdownMenuItemsProps ) {
83
87
return (
84
88
< div
85
- className = { cn ( 'grid grid-cols-[repeat(10,1fr)] gap-1' , className ) }
89
+ className = { cn (
90
+ 'grid grid-cols-[repeat(10,1fr)] place-items-center gap-1' ,
91
+ className
92
+ ) }
86
93
{ ...props }
87
94
>
88
95
< TooltipProvider >
@@ -96,6 +103,7 @@ export function ColorDropdownMenuItems({
96
103
updateColor = { updateColor }
97
104
/>
98
105
) ) }
106
+ { props . children }
99
107
</ TooltipProvider >
100
108
</ div >
101
109
) ;
0 commit comments