wix-style-react
Version:
wix-style-react
44 lines (39 loc) • 1.29 kB
TypeScript
import * as React from 'react';
import { InputProps } from '../Input';
import { PopoverCommonProps } from '../common';
import { SupportedWixLocales } from 'wix-design-systems-locale-utils';
export type TimeInputProps = {
className?: string;
dataHook?: string;
disabled?: InputProps['disabled'];
border?: InputProps['border'];
onChange?({ date }: { date: Date | null }): void;
onInvalid?(): void;
placeholder?: InputProps['placeholder'];
prefix?: InputProps['prefix'];
readOnly?: InputProps['readOnly'];
size?: InputProps['size'];
status?: InputProps['status'];
statusMessage?: InputProps['statusMessage'];
invalidMessage?: string;
step?: number;
suffix?: InputProps['suffix'];
locale?: SupportedWixLocales;
timeStyle?: 'long' | 'short';
value?: Date | null;
width?: React.CSSProperties['width'];
popoverProps?: PopoverCommonProps;
onFocus?: InputProps['onFocus'];
onBlur?: InputProps['onBlur'];
autoSelect?: InputProps['autoSelect'];
excludePastTimes?: boolean;
filterTime?: (time: Date) => boolean;
};
export type TimeInputImperativeActions = {
focus(): void;
blur(): void;
};
declare const TimeInput: React.ForwardRefExoticComponent<
TimeInputProps & React.RefAttributes<TimeInputImperativeActions>
>;
export default TimeInput;