Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function Day({day, date}: DayProps) {
const dayRef = useRef(null)
const {
focusedDate,
isDateFocused,
isDateSelected,
isDateHovered,
isDateBlocked,
isFirstOrLastSelectedDate,
onDateSelect,
onDateFocus,
onDateHover,
onDayRender,
} = useContext(datepickerContext)
const dayProps = useDay({
date,
focusedDate,
isDateFocused,
isDateSelected,
isDateHovered,
isDateBlocked,
isFirstOrLastSelectedDate,
onDateFocus,
onDateSelect,
onDateHover,
dayRef,
})
const themeContext = useContext(ThemeContext)
const white = getThemeProp('white', globalStyles.colors.white, themeContext)
const mud = getThemeProp('mud', globalStyles.colors.mud, themeContext)