dgz-ui
Version:
Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript
34 lines • 1.22 kB
TypeScript
import { type 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. */
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 {
value?: string;
onChange?: (time: string) => void;
disabled?: boolean;
className?: string;
icon?: ReactNode;
}
/**
* TimePicker - Hour/minute selector that emits time as HH:MM string.
*
* @component
*/
export declare const TimePicker: import("react").ForwardRefExoticComponent<TimePickerProps & import("react").RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=timepicker.d.ts.map