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:
Ruslan Lesiutin
2023-01-05 06:12:47 -08:00
committed by Facebook GitHub Bot
parent 55db1b23ff
commit 06cf36bcd4
4 changed files with 19 additions and 86 deletions
@@ -19,7 +19,6 @@ const {
TextInput,
View,
StyleSheet,
Slider,
Switch,
Alert,
} = require('react-native');
@@ -214,8 +213,8 @@ class AutogrowingTextInputExample extends React.Component<
super(props);
this.state = {
width: 100,
multiline: true,
fullWidth: true,
text: '',
contentSize: {
width: 0,
@@ -234,24 +233,23 @@ 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}
onValueChange={value => this.setState({width: value})}
<Text>Full width:</Text>
<Switch
value={this.state.fullWidth}
onValueChange={value => this.setState({fullWidth: value})}
/>
<Text>Multiline:</Text>
<Switch
value={this.state.multiline}
onValueChange={value => this.setState({multiline: value})}
/>
<Text>TextInput:</Text>
<TextInput
value="prop"
multiline={this.state.multiline}
style={[style, {width: this.state.width + '%'}]}
style={[style, {width: this.state.fullWidth ? '100%' : '50%'}]}
onChangeText={value => this.setState({text: value})}
onContentSizeChange={event =>
this.setState({contentSize: event.nativeEvent.contentSize})