@@ -34,13 +34,13 @@ function Calendar({
34
34
head_cell :
35
35
"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]" ,
36
36
row : "flex w-full mt-2" ,
37
- cell : cn (
37
+ day : cn (
38
38
"relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md" ,
39
39
props . mode === "range"
40
40
? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md"
41
41
: "[&:has([aria-selected])]:rounded-md"
42
42
) ,
43
- day : cn (
43
+ day_button : cn (
44
44
buttonVariants ( { variant : "ghost" } ) ,
45
45
"size-8 p-0 font-normal aria-selected:opacity-100"
46
46
) ,
@@ -53,19 +53,20 @@ function Calendar({
53
53
day_today : "bg-accent text-accent-foreground" ,
54
54
day_outside :
55
55
"day-outside text-muted-foreground aria-selected:text-muted-foreground" ,
56
- day_disabled : "text-muted-foreground opacity-50" ,
56
+ disabled : "text-muted-foreground opacity-50" ,
57
57
day_range_middle :
58
58
"aria-selected:bg-accent aria-selected:text-accent-foreground" ,
59
59
day_hidden : "invisible" ,
60
60
...classNames ,
61
61
} }
62
62
components = { {
63
- IconLeft : ( { className, ...props } ) => (
64
- < ChevronLeft className = { cn ( "size-4" , className ) } { ...props } />
65
- ) ,
66
- IconRight : ( { className, ...props } ) => (
67
- < ChevronRight className = { cn ( "size-4" , className ) } { ...props } />
68
- ) ,
63
+ Chevron : ( className , props ) => {
64
+ if ( props . orientation === "left" ) {
65
+ return < ChevronLeft className = { cn ( "size-4" , className ) } { ...props } />
66
+ }
67
+
68
+ return < ChevronRight className = { cn ( "size-4" , className ) } { ...props } />
69
+ }
69
70
} }
70
71
{ ...props }
71
72
/>
0 commit comments