mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
refactor(rn-tester): removed usages of Slider
Summary: # Changelog: [Internal][Removed] - removed usages of Slider inside rn-tester package Reviewed By: lunaleaps Differential Revision: D40984396 fbshipit-source-id: 6c623c0972bfdac624368506401cf3200340069f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
55db1b23ff
commit
06cf36bcd4
@@ -12,14 +12,7 @@
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const {
|
||||
Text,
|
||||
TextInput,
|
||||
View,
|
||||
StyleSheet,
|
||||
Slider,
|
||||
Switch,
|
||||
} = require('react-native');
|
||||
const {Text, TextInput, View, StyleSheet, Switch} = require('react-native');
|
||||
|
||||
const TextInputSharedExamples = require('./TextInputSharedExamples.js');
|
||||
|
||||
@@ -57,8 +50,8 @@ class AutogrowingTextInputExample extends React.Component<{...}> {
|
||||
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was found
|
||||
* when making Flow check .android.js files. */
|
||||
this.state = {
|
||||
width: 100,
|
||||
multiline: true,
|
||||
fullWidth: true,
|
||||
text: '',
|
||||
contentSize: {
|
||||
width: 0,
|
||||
@@ -85,16 +78,16 @@ class AutogrowingTextInputExample extends React.Component<{...}> {
|
||||
const {style, multiline, ...props} = this.props;
|
||||
return (
|
||||
<View>
|
||||
<Text>Width:</Text>
|
||||
<Slider
|
||||
value={100}
|
||||
minimumValue={0}
|
||||
maximumValue={100}
|
||||
step={10}
|
||||
<Text>Full width:</Text>
|
||||
<Switch
|
||||
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
|
||||
* found when making Flow check .android.js files. */
|
||||
onValueChange={value => this.setState({width: value})}
|
||||
value={this.state.fullWidth}
|
||||
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
|
||||
* found when making Flow check .android.js files. */
|
||||
onValueChange={value => this.setState({fullWidth: value})}
|
||||
/>
|
||||
|
||||
<Text>Multiline:</Text>
|
||||
<Switch
|
||||
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
|
||||
@@ -104,6 +97,7 @@ class AutogrowingTextInputExample extends React.Component<{...}> {
|
||||
* found when making Flow check .android.js files. */
|
||||
onValueChange={value => this.setState({multiline: value})}
|
||||
/>
|
||||
|
||||
<Text>TextInput:</Text>
|
||||
{/* $FlowFixMe(>=0.122.0 site=react_native_android_fb) This comment
|
||||
* suppresses an error found when Flow v0.122.0 was deployed. To see
|
||||
@@ -114,7 +108,7 @@ class AutogrowingTextInputExample extends React.Component<{...}> {
|
||||
multiline={this.state.multiline}
|
||||
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
|
||||
* found when making Flow check .android.js files. */
|
||||
style={[style, {width: this.state.width + '%'}]}
|
||||
style={[style, {width: this.state.fullWidth ? '100%' : '50%'}]}
|
||||
/* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue was
|
||||
* found when making Flow check .android.js files. */
|
||||
onChangeText={value => this.setState({text: value})}
|
||||
|
||||
Reference in New Issue
Block a user