Files
calendar/packages/ui/v2/core/TimezoneSelect.tsx
T
ccc2bdd25e 🧹 One calcom/ui import to rule them all (#5561)
* Removed emptyscreen component v1 version, migrated pages that still used it to v2, and removed v1 of workflow pages and components.

* updated workflow pages imports to remove v2 from path.

* Deleted v1 switch component, deleted v1 api-keys components, deleted old web integrations components that were unused.

* Removed v1 list component.

* Fixed event workflows tab path.

* Fixed import path for button in sandbox page.

* Cleanup and type fixes

* Making explicit indexes

* UI import migrations

* More import fixes

* More import fixes

* Submodule sync

* Type fixes

* Build fixes

Co-authored-by: zomars <zomars@me.com>
2022-11-22 19:55:25 -07:00

30 lines
688 B
TypeScript

import { useMemo } from "react";
import BaseSelect, {
allTimezones,
ITimezoneOption,
ITimezone,
Props as SelectProps,
} from "react-timezone-select";
import { getReactSelectProps } from "../..";
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 };