UNPKG

pick-datetime-react

Version:
22 lines (21 loc) 803 B
import { InputHTMLAttributes, LabelHTMLAttributes, ReactNode } from 'react'; export declare type Rename<T, K extends keyof T, N extends string> = Pick<T, Exclude<keyof T, K>> & { [P in N]: T[K]; }; export declare type FormGroupProps = { children: ReactNode; }; export declare type FormLabelProps = { srOnly?: boolean; } & LabelHTMLAttributes<HTMLLabelElement>; export declare type FormInputProps = { messageType?: FormMessageProps['variant']; } & InputHTMLAttributes<HTMLInputElement>; export declare type FormMessageProps = { children: ReactNode; variant?: 'danger' | 'success'; }; export declare type FormItemProps = { label?: ReactNode; message?: Rename<FormMessageProps, 'children', 'value'>; } & Pick<FormLabelProps, 'srOnly'> & FormInputProps;