diff --git a/packages/rn-tester/js/examples/Accessibility/AccessibilityExample.js b/packages/rn-tester/js/examples/Accessibility/AccessibilityExample.js index 1c919b9d99..268550b806 100644 --- a/packages/rn-tester/js/examples/Accessibility/AccessibilityExample.js +++ b/packages/rn-tester/js/examples/Accessibility/AccessibilityExample.js @@ -26,7 +26,6 @@ const { TouchableWithoutFeedback, Alert, StyleSheet, - Slider, Platform, Switch, ScrollView, @@ -1026,38 +1025,6 @@ class AccessibilityActionsExample extends React.Component<{}> { } } -function SliderAccessibilityExample(): React.Node { - return ( - - - - - - - - - - - - ); -} - type FakeSliderExampleState = { current: number, textualValue: 'center' | 'left' | 'right', @@ -1663,12 +1630,6 @@ exports.examples = [ return ; }, }, - { - title: 'Slider Accessibility Examples', - render(): React.Element { - return ; - }, - }, { title: 'Fake Slider Example', render(): React.Element { diff --git a/packages/rn-tester/js/examples/NativeAnimation/NativeAnimationsExample.js b/packages/rn-tester/js/examples/NativeAnimation/NativeAnimationsExample.js index 09caeb1803..e4f7f4aba3 100644 --- a/packages/rn-tester/js/examples/NativeAnimation/NativeAnimationsExample.js +++ b/packages/rn-tester/js/examples/NativeAnimation/NativeAnimationsExample.js @@ -23,11 +23,8 @@ const { Animated, StyleSheet, TouchableWithoutFeedback, - Slider, } = require('react-native'); -const AnimatedSlider = Animated.createAnimatedComponent(Slider); - class Tester extends React.Component<$FlowFixMeProps, $FlowFixMeState> { state: any | {js: AnimatedValue, native: AnimatedValue} = { native: new Animated.Value(0), @@ -237,13 +234,6 @@ class EventExample extends React.Component<{...}, $FlowFixMeState> { Scroll me sideways! - ); } @@ -637,16 +627,6 @@ exports.examples = [ ); }, }, - { - title: 'Drive custom property (tap to animate)', - render: function (): React.Node { - return ( - - {anim => } - - ); - }, - }, { title: 'Animated value listener', render: function (): React.Node { diff --git a/packages/rn-tester/js/examples/TextInput/TextInputExample.android.js b/packages/rn-tester/js/examples/TextInput/TextInputExample.android.js index dd22821174..45e9f8623c 100644 --- a/packages/rn-tester/js/examples/TextInput/TextInputExample.android.js +++ b/packages/rn-tester/js/examples/TextInput/TextInputExample.android.js @@ -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 ( - Width: - Full width: + =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})} /> + Multiline: =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})} /> + TextInput: {/* $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})} diff --git a/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js b/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js index 7cff25b37a..94967c0784 100644 --- a/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js +++ b/packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js @@ -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 ( - Width: - this.setState({width: value})} + Full width: + this.setState({fullWidth: value})} /> + Multiline: this.setState({multiline: value})} /> + TextInput: this.setState({text: value})} onContentSizeChange={event => this.setState({contentSize: event.nativeEvent.contentSize})