UNPKG

dynamic-modal

Version:

The dynamic-modal is a solution of creation different modals into project using a json configuration file

24 lines (23 loc) 893 B
import { ButtonHTMLAttributes, CSSProperties, ReactNode } from 'react'; import { FieldValues, UseFormGetValues } from 'react-hook-form'; import { IFieldProps } from './field'; type IButtonHtmlProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'id' | 'disabled' | 'className' | 'style' | 'type' | 'onClick' | 'children' | 'color'>; export interface IMakeButton extends IButtonHtmlProps { id?: string; elementType: 'button'; disabled?: boolean; className?: string; style?: CSSProperties; customProperties?: Record<string, any>; variant?: string; text?: string; type?: 'button' | 'submit' | 'reset'; onClick?: (formData: FieldValues) => void; color?: string; children?: ReactNode; } export interface IMakeButtonProps extends IFieldProps { element: Omit<IMakeButton, 'elementType'>; getValues: UseFormGetValues<FieldValues>; } export {};