@i-novus/ui-core
Version:
Базовые UI компоненты
11 lines (10 loc) • 494 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { useCallback } from 'react';
import { CalendarSelect } from './CalendarSelect';
export const MonthSelect = ({ onSelectMonth, options, ...rest }) => {
const handleSelectMonth = useCallback((monthName) => {
const monthIndex = options.indexOf(monthName);
onSelectMonth(monthIndex);
}, [onSelectMonth, options]);
return (_jsx(CalendarSelect, { ...rest, options: options, onSelectOption: handleSelectMonth }));
};