import { DayPickerContextValue } from 'contexts/DayPicker' ; import { ActiveModifiers } from 'types/Modifiers' ; /** Return the class names for the Day element, according to the given active modifiers. */ export function getDayClassNames ( dayPicker , activeModifiers ) { const classNames = [ dayPicker . classNames . day ] ; Object . keys ( activeModifiers ) . forEach ( ( modifier ) => { const customClassName = dayPicker . modifiersClassNames [ modifier ] ; if ( customClassName ) { classNames . push ( customClassName ) ; } else { classNames . push ( `${ dayPicker . modifierPrefix }${ modifier }` ) ; } } ) ; return classNames ; }