tnt-switch
v1.0.0
Published
react Switch组件
Downloads
2
Readme
react Switch组件
#Development npm i && npm test
#Usage
var TntScore = require('tnt-switch');
var React = require('react');
var ReactDOM = require('react-dom');
ReactDOM.render(<TntSwitch />, document.getElementById('app'));
#API
##props
| name | type | default | description |
| disabled | bool | false | 不允许更改 |
| defaultValue | bool | false | 默认是否选中 |
| style | object | {} | 组件容器样式 |
| onChange | function(val:bool) | | 改变之后的值 |
| checkedTxt | string | | 选中状态文字 |
| uncheckedTxt | string | | 未选中状态文字 |
| prefixCls | string | tnt-switch | 样式前缀用于重写样式 |