UNPKG

@yamatomo/chakra-react-datepicker

Version:
49 lines (48 loc) 1.95 kB
import { BoxProps, ResponsiveValue, InputProps, ColorMode } from '@chakra-ui/react'; import React from 'react'; import { ReactDatePickerProps } from 'react-datepicker'; declare const datePickerThemes: { light: { gray100: string; gray200: string; gray300: string; gray400: string; gray500: string; color300: string; color500: string; color600: string; header: string; text: string; negativeText: string; monthBackground: string; outsideDay: string; }; dark: { gray100: string; gray200: string; gray300: string; gray400: string; gray500: string; color300: string; color500: string; color600: string; header: string; text: string; negativeText: string; monthBackground: string; outsideDay: string; }; }; declare type DatePickerTheme = typeof datePickerThemes.light; declare type Size = 'xs' | 'sm' | 'md' | 'xl'; declare type OmittedInputProps = Omit<InputProps, 'isDisabled' | 'onChange'>; declare type Props<CustomModifierNames extends string = never, WithRange extends boolean | undefined = undefined> = Omit<ReactDatePickerProps<CustomModifierNames, WithRange>, 'todayButton'> & { rootProps?: BoxProps; inputProps?: OmittedInputProps; datePickerSize?: ResponsiveValue<Size>; datePickerColorSchema?: InputProps['colorScheme']; extendDatePickerTheme?: (colorMode: ColorMode, provide: DatePickerTheme) => DatePickerTheme; }; declare const DatePicker: <CustomModifierNames extends string = never, WithRange extends boolean | undefined = undefined>({ rootProps, inputProps, datePickerSize: datePickerSizeProps, datePickerColorSchema, extendDatePickerTheme, ...datePickerProps }: React.PropsWithChildren<Props<CustomModifierNames, WithRange>>) => JSX.Element | null; export { DatePicker }; export type { Props };