react-native-dj-switch
v1.0.1
Published
daojia react-native-dj-switch
Downloads
18
Readme
Toast

Install
npm i --save react-native-dj-switchUsage
Using in your app will usually look like this:
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableHighlight,
} from 'react-native';
import Switch from 'react-native-dj-switch';
export default class NPMTest extends Component {
render() {
return (
<View style={{marginTop:20}}>
<Switch open={true} onChange={this.onChange.bind(this)} />
</View>
);
}
}
AppRegistry.registerComponent('xxx', () => NPMTest);Props
The following props can be used to modify the style and/or behaviour:
| Prop | Type | Opt/Required | Default | Note |
|---|---|---|---|---|
|open|boolean|Option|false| 控制UI是否处于打开状态,不控制数据状态,数据状态请自行控制
|onChange|function|Option|``| 状态改变触发的动作
Methods
The following methods can be used to open and close the Dialog:
| Method | Parameters | Note | |---|---|---|
