UNPKG

formik-material-ui

Version:

[![Build Status](https://travis-ci.org/stackworx/formik-material-ui.svg?branch=master)](https://travis-ci.org/stackworx/formik-material-ui) [![license](https://badgen.now.sh/badge/license/MIT)](./LICENSE) [![Coverage Status](https://coveralls.io/repos/git

8 lines (7 loc) 463 B
import * as React from 'react'; import { SwitchProps as MuiSwitchProps } from '@material-ui/core/Switch'; import { FieldProps } from 'formik'; export interface SwitchProps extends FieldProps, Omit<MuiSwitchProps, 'form' | 'name' | 'onChange' | 'value' | 'defaultChecked'> { } export declare const fieldToSwitch: ({ field, form: { isSubmitting }, disabled, ...props }: SwitchProps) => MuiSwitchProps; export declare const Switch: React.ComponentType<SwitchProps>;