mirror of
https://github.com/zoriya/react-native-web.git
synced 2025-12-23 23:35:11 +00:00
Move 'website' to 'packages/website'
Keep all workspaces in the 'packages' directory.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
/* eslint-disable react/jsx-no-bind */
|
||||
/**
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Switch, TouchableHighlight, View } from 'react-native';
|
||||
|
||||
class TouchableWrapperExample extends React.PureComponent {
|
||||
state = {
|
||||
on: false
|
||||
};
|
||||
|
||||
render() {
|
||||
const { on } = this.state;
|
||||
|
||||
return (
|
||||
<View>
|
||||
<TouchableHighlight onPress={() => {}} style={style} underlayColor="#eee">
|
||||
<Switch onValueChange={this._handleChange} value={on} />
|
||||
</TouchableHighlight>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
_handleChange = value => {
|
||||
this.setState({ on: value });
|
||||
};
|
||||
}
|
||||
|
||||
const style = {
|
||||
alignSelf: 'flex-start',
|
||||
borderWidth: 1,
|
||||
borderColor: '#ddd',
|
||||
paddingHorizontal: 50,
|
||||
paddingVertical: 20
|
||||
};
|
||||
|
||||
export default TouchableWrapperExample;
|
||||
Reference in New Issue
Block a user