UNPKG

@blockscout/ui-toolkit

Version:

A comprehensive collection of reusable Chakra UI components and theme system for Blockscout's projects

9 lines (8 loc) 713 B
import { default as React } from 'react'; import { FieldValues, Path } from 'react-hook-form'; import { FormFieldPropsBase } from './types'; import { SwitchProps } from '../../../chakra/switch'; export type FormFieldSwitchProps<FormFields extends FieldValues, Name extends Path<FormFields>> = Pick<FormFieldPropsBase<FormFields, Name>, 'name' | 'rules' | 'controllerProps'> & SwitchProps; declare const FormFieldSwitchContent: <FormFields extends FieldValues, Name extends Path<FormFields>>({ name, onCheckedChange, rules, controllerProps, disabled, children, ...rest }: FormFieldSwitchProps<FormFields, Name>) => React.JSX.Element; export declare const FormFieldSwitch: typeof FormFieldSwitchContent; export {};