UNPKG

dgz-ui-shared

Version:

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

29 lines 1.53 kB
import { TimePickerProps } from 'dgz-ui/calendar'; import { FormItemProps } from 'dgz-ui/form'; import { FieldValues } from 'react-hook-form'; /** * Props for the MyTimePicker component. * @template TFieldValues - The type of the form values. */ export type MyTimePickerProps<TFieldValues extends FieldValues> = FormItemProps<TFieldValues> & TimePickerProps & { /** Whether the field is required. */ required?: boolean; /** Custom CSS class name. */ className?: string; }; /** * MyTimePicker is a time selection input with optional react-hook-form integration. * * @template TFieldValues - Form values type used by react-hook-form. * @param control - The `react-hook-form` control object. * @param name - The name of the field in `react-hook-form`. * @param label - The label to display for the time picker. * @param required - Whether the field is required. * @param className - Custom CSS class name. * @param rules - The `react-hook-form` validation rules. * @param floatingError - Whether to show the error message in a floating container. * @param props - TimePicker and form item props. * @returns {JSX.Element} A time picker component integrated with react-hook-form, or standalone TimePicker if no form integration */ export declare const MyTimePicker: <TFieldValues extends FieldValues>({ control, name, label, required, className, rules, floatingError, ...props }: MyTimePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=MyTimePicker.d.ts.map