3.2.2 • Published 2 years ago

dw-neit-rc-switch v3.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

dw-neit-rc-switch


Switch ui component for react.

NPM version build status Test coverage Dependencies DevDependencies npm download bundle size

Install

dw-neit-rc-switch

Usage

import Switch from 'dw-neit-rc-switch';

export default () => <Switch />;

Compatibility

IE / EdgeFirefoxChromeSafariElectron
IE11, Edgelast 2 versionslast 2 versionslast 2 versionslast 2 versions

API

PropertyTypeDefaultDescription
prefixClsStringdw-neit-rc-switch
classNameString''additional class name of root node
checkedbooleanfalsewhether switch is checked
defaultCheckedbooleanfalsewhether switch is checked on init
onChangeFunction(checked, event)called when switch is checked or unchecked
tabIndexnumbertab-index of switch node
onClickFunction(checked, event)called when switch is clicked
autoFocusbooleanget focus when mounts
disabledbooleanfalsewhether switch is disabled
loadingIconReact.ReactNodespecific the extra node. generally used in loading icon.

Development

npm install
npm start

Online demo: http://react-component.github.io/switch/examples/

License

dw-neit-rc-switch is released under the MIT license.