4.1.0 • Published 11 months ago

dw-neit-rc-switch v4.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

dw-neit-rc-switch


Switch ui component for react.

NPM version npm download build status Test coverage 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/

License

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