DefinitelyTyped/types/rc-switch/rc-switch-tests.ts
Matteo Frana 8394dae20e checkedChildren and unCheckedChildren are optional (#41274)
* QueryOptions: added refetchIntervalInBackground, refetchOnWindowFocus, initialData

* Removed extra space

* Removed patch version number

* Fixed initialData optional and of type TResult

* checkedChildren and unCheckedChildren are optional
2019-12-31 15:33:37 -08:00

27 lines
536 B
TypeScript

import * as React from 'react';
import * as ReactDOM from 'react-dom';
import Switch, { Props } from 'rc-switch';
/**
* Only required props (none)
*/
React.createElement(Switch);
/**
* All accepted props
*/
React.createElement(Switch, {
autoFocus: false,
checked: false,
checkedChildren: 'hello',
className: 'switch',
defaultChecked: false,
disabled: false,
loadingIcon: 0,
onChange: console.log,
onClick: console.log,
prefixCls: 'rc-',
tabIndex: 0,
unCheckedChildren: 'world',
});