Files
react-native/packages/rn-tester/js/examples/TurboModule/TurboModuleExampleCommon.js
T
Ruslan Shestopalyuk 95e20ed9a6 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
2023-02-28 06:31:49 -08:00

59 lines
1.1 KiB
JavaScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
*/
import {Platform, StyleSheet} from 'react-native';
// $FlowFixMe[value-as-type]
const styles: StyleSheet = StyleSheet.create({
container: {
flex: 1,
},
item: {
flexDirection: 'row',
margin: 2,
},
column: {
flex: 2,
justifyContent: 'center',
paddingLeft: 5,
paddingRight: 5,
},
result: {
alignItems: 'stretch',
justifyContent: 'space-between',
},
value: {
fontFamily: Platform.OS === 'ios' ? 'Menlo' : 'monospace',
fontSize: 10,
},
type: {
color: '#333',
fontSize: 8,
},
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',
fontSize: 12,
},
});
export default styles;