GoScrobble/web/node_modules/react-timezone-select/dist/index.d.ts

24 lines
848 B
TypeScript
Raw Normal View History

2022-04-25 02:47:15 +00:00
/// <reference types="react" />
import type { Props as ReactSelectProps } from 'react-select';
declare type ExcludeValue<T> = Pick<T, Exclude<keyof T, 'value'>>;
export declare type ICustomTimezone = {
[key: string]: string;
};
export declare const i18nTimezones: ICustomTimezone;
export declare type ILabelStyle = 'original' | 'altName' | 'abbrev';
export declare type ITimezoneOption = {
value: string;
label: string;
abbrev?: string;
altName?: string;
offset?: number;
};
export declare type ITimezone = ITimezoneOption | string;
interface Props extends ExcludeValue<ReactSelectProps> {
value: ITimezone;
labelStyle?: ILabelStyle;
timezones?: ICustomTimezone;
}
declare const TimezoneSelect: ({ value, onBlur, onChange, labelStyle, timezones, ...props }: Props) => JSX.Element;
export default TimezoneSelect;