1 import type { ChangeEvent } from 'react';
3 import Select from '@proton/components/components/select/Select';
5 import SettingsLayout from '../../../account/SettingsLayout';
6 import SettingsLayoutLeft from '../../../account/SettingsLayoutLeft';
7 import SettingsLayoutRight from '../../../account/SettingsLayoutRight';
8 import { getDaysOfMonthOptions } from '../../utils';
14 onChange: (day: number) => void;
17 const DayOfMonthField = ({ id, label, value, onChange }: Props) => {
18 const handleChange = ({ target }: ChangeEvent<HTMLSelectElement>) => onChange(+target.value);
23 <label htmlFor={id} className="text-semibold">
28 <Select id={id} options={getDaysOfMonthOptions()} value={value} onChange={handleChange} />
29 </SettingsLayoutRight>
34 export default DayOfMonthField;