Use transform prop in PanResponderExample

Summary:
Replaces deprecated `translateX` and `translateY` props with `transform` prop in PanResponderExample. This fixes the RNTester example for react-native-windows, which doesn't support the deprecated props.

Changelog:
[General][Fixed] - [RNTester] Use transform prop in PanResponderExample

Reviewed By: kacieb

Differential Revision: D28676164

fbshipit-source-id: 437912b5abf6ca74f0043ded7a902a5938bcf93a
This commit is contained in:
Eric Rozell 2021-05-25 09:08:47 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 3a9e14e8a9
Коммит 917f83c940
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -112,8 +112,10 @@ class PanResponderExample extends React.Component<Props, State> {
styles.circle, styles.circle,
// $FlowFixMe[incompatible-type] // $FlowFixMe[incompatible-type]
{ {
translateX: this.state.left, transform: [
translateY: this.state.top, {translateX: this.state.left},
{translateY: this.state.top},
],
backgroundColor: this.state.pressed ? 'blue' : 'green', backgroundColor: this.state.pressed ? 'blue' : 'green',
}, },
]} ]}