UNPKG

@hhgtech/hhg-components

Version:
26 lines (25 loc) 1.23 kB
import React from 'react'; import { BoxProps } from '@mantine/core'; import { DatePickerProps as MantineDatePickerProps, Input } from "../../mantine"; import { PhoneProps } from "../../mantine/phone"; import { AddressInputProps } from "../../molecules/addressInput"; type InputType = 'phone' | 'full_name' | 'email' | 'gender' | 'dob' | 'otp' | 'password' | 'confirm_password' | 'term' | 'address'; type ElementCommonProps = { label?: string; name?: string; inputType?: InputType; className?: string; }; type TextProps = ElementCommonProps & typeof Input; type AddressProps = ElementCommonProps & AddressInputProps; type DatePickerProps = ElementCommonProps & MantineDatePickerProps; export type DynamicInputOrderProps = Array<InputType | ElementCommonProps | TextProps | AddressProps | DatePickerProps>; export type DynamicFormProps = { defaultCountry?: PhoneProps['defaultCountry']; inputOrder?: DynamicInputOrderProps; withSimilac?: boolean; customTerms?: React.ReactNode; formContext?: any; } & BoxProps; export declare const DynamicForm: <T = any>({ inputOrder, withSimilac, customTerms, formContext, ...rest }: DynamicFormProps) => React.JSX.Element; export {};