UNPKG

@ozen-ui/kit

Version:

React component library

21 lines (20 loc) 694 B
import { cn } from '../../utils/classname'; export var cnCalendar = cn('Calendar'); export var getPeriodSwitchAriaLabel = function (step) { if (step === 'days') { return ['Previous month', 'Next month']; } if (step === 'months') { return ['Previous year', 'Next year']; } return ['Previous period', 'Next period']; }; export var calculateStepsAvailability = function (steps) { return ({ hasDaysStep: steps.includes('days'), hasMonthsStep: steps.includes('months'), hasYearsStep: steps.includes('years'), }); }; export var calculateStepsHelpers = function (steps) { return ({ lastStep: steps[steps.length - 1], firstStep: steps[0], }); };