quantumai-design-system
Version:
퀀텀에이아이의 디자인 시스템
27 lines (26 loc) • 1.06 kB
TypeScript
/// <reference types="react" />
import { ReactDatePickerCustomHeaderProps } from 'react-datepicker';
export type DateType = Date | null;
export type DateRangeType = Record<'startDate' | 'endDate', DateType>;
export type DatePickerInputProps = {
isOpen: boolean;
inputType?: 'single' | 'range';
inputTitle?: string;
titleMaxLength?: number;
} & Omit<any, 'isOpen'>;
export interface DatePickerHeaderProps extends ReactDatePickerCustomHeaderProps {
viewCount?: 1 | 2;
}
export interface DateRangePickerProps extends React.HTMLAttributes<HTMLDivElement>, DateRangeType {
viewCount?: 1 | 2;
onToggleChange?: (isOpen: boolean) => void;
onDateChange: ({ startDate, endDate }: DateRangeType) => void;
onSelectFinish?: ({ startDate, endDate }: DateRangeType) => void;
}
export interface DateSinglePickerProps extends React.HTMLAttributes<HTMLDivElement> {
startDate: DateType;
inputTitle?: string;
titleMaxLength?: number;
onToggleChange?: (isOpen: boolean) => void;
onDateChange: (startDate: DateType) => void;
}