diff --git a/packages/rn-tester/js/examples/ScrollView/ScrollViewExample.js b/packages/rn-tester/js/examples/ScrollView/ScrollViewExample.js
index e031dbc0fca..11c620ff8e9 100644
--- a/packages/rn-tester/js/examples/ScrollView/ScrollViewExample.js
+++ b/packages/rn-tester/js/examples/ScrollView/ScrollViewExample.js
@@ -13,7 +13,6 @@ const React = require('react');
const {
Platform,
ScrollView,
- Picker,
StyleSheet,
Text,
TouchableOpacity,
@@ -549,6 +548,7 @@ const SnapToOptions = () => {
const [snapToInterval, setSnapToInterval] = useState(0);
const [snapToOffsets, setSnapToOffsets] = useState([]);
const [snapToStart, setSnapToStart] = useState(true);
+
return (
{
{Platform.OS === 'ios' ? (
<>
- Snap to Alignment Mode
- {
- if (value === 'start' || value === 'center' || value === 'end') {
- setSnapToAlignment(value);
- }
- }}
- itemStyle={styles.pickerItem}>
- {snapToAlignmentModes.map(label => {
- return ;
- })}
-
+ Select Snap to Alignment Mode
+
+ {snapToAlignmentModes.map(label => (
+
>
) : null}
@@ -887,35 +883,27 @@ const KeyboardExample = () => {
{ITEMS.map(createItemRow)}
Keyboard Dismiss Mode
- {
- if (
- value === 'none' ||
- value === 'on-drag' ||
- value === 'interactive'
- ) {
- setKeyboardDismissMode(value);
- }
- }}
- itemStyle={styles.pickerItem}>
- {dismissOptions.map(label => {
- return ;
- })}
-
+
+ {dismissOptions.map(value => (
+ setKeyboardDismissMode(value)}
+ />
+ ))}
+
Keyboard Should Persist taps
- {
- if (value === 'never' || value === 'always' || value === 'handled') {
- setKeyboardShouldPersistTaps(value);
- }
- }}
- itemStyle={styles.pickerItem}>
- {persistOptions.map(label => {
- return ;
- })}
-
+
+ {persistOptions.map(value => (
+ setKeyboardShouldPersistTaps(value)}
+ />
+ ))}
+
);
};
@@ -1228,12 +1216,16 @@ let ITEMS = [...Array(12)].map((_, i) => `Item ${i}`);
const createItemRow = (msg, index) => ;
const Button = (props: {
+ active?: boolean,
label: string,
onPress: () => void,
testID?: string,
}) => (
{props.label}
@@ -1253,7 +1245,11 @@ const styles = StyleSheet.create({
fontWeight: 'bold',
margin: 5,
},
+ activeButton: {
+ backgroundColor: 'rgba(100,215,255,.3)',
+ },
button: {
+ flex: 1,
margin: 5,
padding: 5,
alignItems: 'center',
@@ -1274,12 +1270,10 @@ const styles = StyleSheet.create({
containerStyle: {
backgroundColor: '#aae3b6',
},
- pickerItem: {
- fontSize: 16,
- },
rowTitle: {
flex: 1,
fontWeight: 'bold',
+ alignSelf: 'center',
},
textInput: {
height: 40,