1.0.0 • Published 8 years ago

tnt-switch v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

#tnt-switch npm version

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 | 样式前缀用于重写样式 |
1.0.0

8 years ago

0.0.1

8 years ago