import type { FunctionComponent , HTMLAttributes , MouseEvent } from 'react' ; import type { Props } from './DayStyle' ; import DayStyle from './DayStyle' ; const Day = ( { children , date , outside , onSelectDay , ... otherProps } ) => { return ( < DayStyle href = "/" variant = "blank" data - testid = "day" onClick = { ( e ) => { e . preventDefault ( ) ; if ( onSelectDay ) { onSelectDay ( date ) ; } } } outside = { outside } date = { date } { ... otherProps } > { children } < /DayStyle>); } ; export default Day ;