dynamic-modal
Version:
The dynamic-modal is a solution of creation different modals into project using a json configuration file
21 lines (20 loc) • 633 B
TypeScript
import { CSSProperties, ReactNode } from 'react';
import { IFieldProps } from './field';
import { FieldValues, UseFormGetValues } from 'react-hook-form';
export interface IMakeButton {
id?: string;
elementType: 'button';
disabled?: boolean;
className?: string;
style?: CSSProperties;
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>;
}