File tree 3 files changed +19
-11
lines changed
3 files changed +19
-11
lines changed Original file line number Diff line number Diff line change 42
42
"lucide-react" : " ^0.438.0" ,
43
43
"next-themes" : " ^0.3.0" ,
44
44
"react" : " ^18.3.1" ,
45
- "react-day-picker" : " ^8.10.1 " ,
45
+ "react-day-picker" : " ^9.0.0 " ,
46
46
"react-dom" : " ^18.3.1" ,
47
47
"react-hook-form" : " ^7.52.0" ,
48
48
"react-resizable-panels" : " ^2.0.19" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { buttonVariants } from '@affine/admin/components/ui/button';
2
2
import { cn } from '@affine/admin/utils' ;
3
3
import { ChevronLeft , ChevronRight } from 'lucide-react' ;
4
4
import type * as React from 'react' ;
5
- import { DayPicker } from 'react-day-picker' ;
5
+ import { Chevron , DayPicker } from 'react-day-picker' ;
6
6
7
7
export type CalendarProps = React . ComponentProps < typeof DayPicker > ;
8
8
@@ -51,8 +51,15 @@ function Calendar({
51
51
...classNames ,
52
52
} }
53
53
components = { {
54
- IconLeft : ( ) => < ChevronLeft className = "w-4 h-4" /> ,
55
- IconRight : ( ) => < ChevronRight className = "w-4 h-4" /> ,
54
+ Chevron : props => {
55
+ if ( props . orientation === 'left' ) {
56
+ return < ChevronLeft className = "w-4 h-4" /> ;
57
+ }
58
+ if ( props . orientation === 'right' ) {
59
+ return < ChevronRight className = "w-4 h-4" /> ;
60
+ }
61
+ return < Chevron { ...props } /> ;
62
+ } ,
56
63
} }
57
64
{ ...props }
58
65
/>
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ __metadata:
205
205
lucide-react: "npm:^0.438.0"
206
206
next-themes: "npm:^0.3.0"
207
207
react: "npm:^18.3.1"
208
- react-day-picker: "npm:^8.10.1 "
208
+ react-day-picker: "npm:^9.0.0 "
209
209
react-dom: "npm:^18.3.1"
210
210
react-hook-form: "npm:^7.52.0"
211
211
react-resizable-panels: "npm:^2.0.19"
@@ -30838,13 +30838,14 @@ __metadata:
30838
30838
languageName: node
30839
30839
linkType: hard
30840
30840
30841
- "react-day-picker@npm:^8.10.1":
30842
- version: 8.10.1
30843
- resolution: "react-day-picker@npm:8.10.1"
30841
+ "react-day-picker@npm:^9.0.0":
30842
+ version: 9.0.8
30843
+ resolution: "react-day-picker@npm:9.0.8"
30844
+ dependencies:
30845
+ date-fns: "npm:^3.6.0"
30844
30846
peerDependencies:
30845
- date-fns: ^2.28.0 || ^3.0.0
30846
- react: ^16.8.0 || ^17.0.0 || ^18.0.0
30847
- checksum: 10/374056dca7fed70a154a3b0e98c6c746c26b4fc868548fa8f285ef3cab9679537e84c0c21ba7b6db67b3f7f54cc562f5d83efba2c7f2c7bd3705ac8992869607
30847
+ react: ">=16.8.0"
30848
+ checksum: 10/8a941b71e29a07a6ef40e35e5f6f46a332537184b4d67d90093415c4ade6c66dc787c0f26ca0841b4ee8bca40b05fa881cd73d69a263720c4c3da1e3c0a7bb37
30848
30849
languageName: node
30849
30850
linkType: hard
30850
30851
You can’t perform that action at this time.
0 commit comments