mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
857137dc21
Summary: ## Rationale - We actually don't have E2E tests that test the parser + generator together, until now. - **Documentation Value:** These tests show how the Component Spec files in [react-native-codegen/e2e/__test_fixtures__/](https://www.internalfb.com/code/fbsource/[e32a790dfa05]/xplat/js/react-native-github/packages/react-native-codegen/e2e/__test_fixtures__/components/) map to all the different types of codegen output. Changelog: [Internal] Reviewed By: sshic Differential Revision: D32081445 fbshipit-source-id: 02cd17945ef63a42381d6d4adbd0a9b0eaa2a1ef
43 lines
1.5 KiB
JavaScript
43 lines
1.5 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its 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 type {PointValue} from '../../../../../Libraries/StyleSheet/StyleSheetTypes';
|
|
import type {ColorValue} from '../../../../../Libraries/StyleSheet/StyleSheet';
|
|
import type {ImageSource} from '../../../../../Libraries/Image/ImageSource';
|
|
import type {
|
|
Int32,
|
|
Float,
|
|
WithDefault,
|
|
} from '../../../../../Libraries/Types/CodegenTypes';
|
|
import type {ViewProps} from '../../../../../Libraries/Components/View/ViewPropTypes';
|
|
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent';
|
|
import type {HostComponent} from '../../../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
|
|
type NativeProps = $ReadOnly<{|
|
|
...ViewProps,
|
|
|
|
// Props
|
|
names?: $ReadOnlyArray<string>,
|
|
disableds?: $ReadOnlyArray<boolean>,
|
|
progress?: $ReadOnlyArray<Int32>,
|
|
radii?: $ReadOnlyArray<Float>,
|
|
colors?: $ReadOnlyArray<ColorValue>,
|
|
srcs?: $ReadOnlyArray<ImageSource>,
|
|
points?: $ReadOnlyArray<PointValue>,
|
|
// TODO(T104760003) Fix EdgeInsetsValue in codegen
|
|
// edgeInsets?: $ReadOnlyArray<EdgeInsetsValue>,
|
|
sizes?: WithDefault<$ReadOnlyArray<'small' | 'large'>, 'small'>,
|
|
object?: $ReadOnlyArray<$ReadOnly<{|prop: string|}>>,
|
|
|}>;
|
|
|
|
export default (codegenNativeComponent<NativeProps>(
|
|
'ArrayPropsNativeComponentView',
|
|
): HostComponent<NativeProps>);
|