Files
calendar/packages/ui/v2/core/TimezoneSelect.tsx
T
Jeroen ReumkensGitHubPeer RichelsenHariom Balharakodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
7ed21b692e #4306: Added darkmode support for select by styling via tailwind (#4824)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-10-10 18:50:43 +00:00

30 lines
713 B
TypeScript

import { useMemo } from "react";
import BaseSelect, {
allTimezones,
ITimezoneOption,
ITimezone,
Props as SelectProps,
} from "react-timezone-select";
import { getReactSelectProps } from "@calcom/ui/v2/core/form/select";
function TimezoneSelect({ className, components, ...props }: SelectProps) {
const reactSelectProps = useMemo(() => {
return getReactSelectProps({ className, components: components || {} });
}, [className, components]);
return (
<BaseSelect
{...reactSelectProps}
timezones={{
...allTimezones,
"America/Asuncion": "Asuncion",
}}
{...props}
/>
);
}
export default TimezoneSelect;
export type { ITimezone, ITimezoneOption };