File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
docs-site/src/examples/ts Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -4,18 +4,19 @@ type ExampleCustomInputProps = {
44 onClick ?: ( ) => void ;
55} ;
66
7+ const ExampleCustomInput = forwardRef <
8+ HTMLButtonElement ,
9+ ExampleCustomInputProps
10+ > ( ( { value, onClick, className } , ref ) => (
11+ < button type = "button" className = { className } onClick = { onClick } ref = { ref } >
12+ { value }
13+ </ button >
14+ ) ) ;
15+ ExampleCustomInput . displayName = "ExampleCustomInput" ;
16+
717const CustomInput = ( ) => {
818 const [ selectedDate , setSelectedDate ] = useState < Date | null > ( new Date ( ) ) ;
919
10- const ExampleCustomInput = forwardRef <
11- HTMLButtonElement ,
12- ExampleCustomInputProps
13- > ( ( { value, onClick, className } , ref ) => (
14- < button className = { className } onClick = { onClick } ref = { ref } >
15- { value }
16- </ button >
17- ) ) ;
18-
1920 return (
2021 < DatePicker
2122 selected = { selectedDate }
You can’t perform that action at this time.
0 commit comments