1.0.0 • Published 11 months ago

@fe-rc/switch v1.0.0

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

@fe-rc/switch

Switch ui component for react.

NPM version npm download

Install

npm i @fe-rc/switch -S

Usage

import Switch from '@fe-rc/switch';

export default () => <Switch />;

API

PropertyTypeDefaultDescription
prefixClsStringrc-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

License

MIT license.

1.0.0

11 months ago

0.0.1

11 months ago