feat(ui): add TimeZonePicker component

This commit is contained in:
robin 2022-11-10 16:02:19 +08:00
parent f863869406
commit 860f39664e
1 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
import { Form } from 'react-bootstrap';
import { TIMEZONES } from '@/common/constants';
const TimeZonePicker = (props) => {
return (
<Form.Select {...props}>
{TIMEZONES?.map((item) => {
return (
<optgroup label={item.label} key={item.label}>
{item.options.map((option) => {
return (
<option value={option.value} key={option.value}>
{option.label}
</option>
);
})}
</optgroup>
);
})}
</Form.Select>
);
};
export default TimeZonePicker;