Skip to content

Commit be558f6

Browse files
cortinicofacebook-github-bot
authored andcommitted
@nocommit - Reproducer for facebook#50797
Summary: Repro for facebook#50797 Changelog: [Internal] [Changed] - Differential Revision: D74071054
1 parent 58a9046 commit be558f6

1 file changed

Lines changed: 36 additions & 5 deletions

File tree

packages/rn-tester/js/examples/Playground/RNTesterPlayground.js

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,45 @@ import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
1313

1414
import RNTesterText from '../../components/RNTesterText';
1515
import * as React from 'react';
16-
import {StyleSheet, View} from 'react-native';
16+
import {
17+
StyleSheet,
18+
View,
19+
Text,
20+
TouchableWithoutFeedback,
21+
TextInput,
22+
} from 'react-native';
1723

1824
function Playground() {
25+
const [value, setValue] = React.useState('0.5');
26+
const [scale, setScale] = React.useState(0.5);
27+
1928
return (
20-
<View style={styles.container}>
21-
<RNTesterText>
22-
Edit "RNTesterPlayground.js" to change this file
23-
</RNTesterText>
29+
<View>
30+
<View style={{backgroundColor: 'green', marginTop: 10}}>
31+
<View style={{height: 100, transform: [{scaleY: 0}]}}>
32+
<TouchableWithoutFeedback onPress={() => console.log('1 clicked')}>
33+
<View style={{flex: 1, backgroundColor: 'red'}} />
34+
</TouchableWithoutFeedback>
35+
</View>
36+
</View>
37+
<View style={{backgroundColor: 'green', marginTop: 10}}>
38+
<View style={{height: 100, transform: [{scaleY: scale}]}}>
39+
<TouchableWithoutFeedback onPress={() => console.log('2 clicked')}>
40+
<View style={{flex: 1, backgroundColor: 'red'}} />
41+
</TouchableWithoutFeedback>
42+
</View>
43+
</View>
44+
<View>
45+
<Text>Scale:</Text>
46+
<TextInput
47+
value={value}
48+
onChangeText={it => {
49+
setValue(it);
50+
const p = parseFloat(it);
51+
if (isFinite(p)) setScale(p);
52+
}}
53+
/>
54+
</View>
2455
</View>
2556
);
2657
}

0 commit comments

Comments
 (0)