UNPKG

dgz-ui

Version:

Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript

38 lines 1.47 kB
import { HTMLAttributes, ReactNode } from 'react'; /** Hour format token used by TimePicker. */ export declare const HOUR = "HH"; /** Minute format token used by TimePicker. */ export declare const MINUTE = "mm"; /** Combined time format string (HH:mm). */ export declare const TIME = "HH:mm"; /** Internal time state used by the picker. * @property {string} hour - The hour value (HH). * @property {string} minute - The minute value (mm). */ export interface TimeState { hour: string; minute: string; } /** * Props for the TimePicker component. * @property {string} [value] - Time in HH:MM format. * @property {(time: string) => void} [onChange] - Called with new HH:MM on change. * @property {boolean} [disabled=false] - Disables selection. * @property {string} [className] - Additional classes for container. * @property {ReactNode} [icon] - Optional leading icon. */ export interface TimePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> { value?: string; onChange?: (time: string) => void; disabled?: boolean; className?: string; icon?: ReactNode; error?: boolean; } /** * TimePicker - Hour/minute selector that emits time as HH:MM string. * @returns {JSX.Element} The rendered TimePicker component. * @component */ export declare const TimePicker: import('react').ForwardRefExoticComponent<TimePickerProps & import('react').RefAttributes<HTMLDivElement>>; //# sourceMappingURL=timepicker.d.ts.map