mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Refactor Android/iOS/C++ TurboModule examples in RNTester/Catalyst
Summary: ## Changelog: [Internal] - Refactor Android/iOS/C++ TurboModule examples ~~This makes sure that both native and pure C++ (NativeCxx) TurboModule examples could be run from the Catalyst app.~~ EDIT: See the discussion - this removes the `Playground (NativeModules)` app from Catalyst, as it's already available from the `RNTester Browser` and doesn't provide the C++ counterpart. Also, there are some tweaks and code factoring in styles, to make it all fit on the screen nicely. Reviewed By: javache Differential Revision: D43605250 fbshipit-source-id: 44ee694660f3ad524b8362149ebe617ee495225e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c18566ffdb
commit
95e20ed9a6
@@ -12,7 +12,6 @@ import NativeSampleTurboModule from 'react-native/Libraries/TurboModule/samples/
|
||||
import {EnumInt} from 'react-native/Libraries/TurboModule/samples/NativeSampleTurboModule';
|
||||
import type {RootTag} from 'react-native/Libraries/ReactNative/RootTag';
|
||||
import {
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
FlatList,
|
||||
@@ -20,6 +19,8 @@ import {
|
||||
TouchableOpacity,
|
||||
RootTagContext,
|
||||
} from 'react-native';
|
||||
|
||||
import styles from './TurboModuleExampleCommon';
|
||||
import * as React from 'react';
|
||||
|
||||
type State = {|
|
||||
@@ -183,46 +184,4 @@ class SampleTurboModuleExample extends React.Component<{||}, State> {
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
},
|
||||
item: {
|
||||
flexDirection: 'row',
|
||||
margin: 6,
|
||||
},
|
||||
column: {
|
||||
flex: 2,
|
||||
justifyContent: 'center',
|
||||
padding: 3,
|
||||
},
|
||||
result: {
|
||||
alignItems: 'stretch',
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
value: {
|
||||
fontFamily: Platform.OS === 'ios' ? 'Menlo' : 'monospace',
|
||||
fontSize: 12,
|
||||
},
|
||||
type: {
|
||||
color: '#333',
|
||||
fontSize: 10,
|
||||
},
|
||||
button: {
|
||||
borderColor: '#444',
|
||||
padding: 3,
|
||||
flex: 1,
|
||||
},
|
||||
buttonTextLarge: {
|
||||
textAlign: 'center',
|
||||
color: 'rgb(0,122,255)',
|
||||
fontSize: 16,
|
||||
padding: 6,
|
||||
},
|
||||
buttonText: {
|
||||
color: 'rgb(0,122,255)',
|
||||
textAlign: 'center',
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = SampleTurboModuleExample;
|
||||
|
||||
Reference in New Issue
Block a user