Download wp-calypso/client/components/date-picker/day.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 643 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/date-picker/day.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/date-picker/day.jsx
-
curl -L -o day.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/date-picker/day.jsx
643 Bytes
| const noop = () => {}; | |
| const handleDayMouseEnter = | |
| ( date, modifiers, onMouseEnter = noop ) => | |
| ( event ) => { | |
| onMouseEnter( date, modifiers, event ); | |
| }; | |
| const handleDayMouseLeave = | |
| ( date, modifiers, onMouseLeave = noop ) => | |
| ( event ) => { | |
| onMouseLeave( date, modifiers, event ); | |
| }; | |
| const DatePickerDay = ( { date, modifiers, onMouseEnter, onMouseLeave } ) => { | |
| return ( | |
| <div | |
| className="date-picker__day" | |
| onMouseEnter={ handleDayMouseEnter( date, modifiers, onMouseEnter ) } | |
| onMouseLeave={ handleDayMouseLeave( date, modifiers, onMouseLeave ) } | |
| > | |
| { date.getDate() } | |
| </div> | |
| ); | |
| }; | |
| export default DatePickerDay; | |