mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
9ad60131ba
Summary: The schema for these view commands is lifted wholesale from the schema for TurboModules: P67239314 Reviewed By: rickhanlonii Differential Revision: D15943109 fbshipit-source-id: a0ccd4e47067b62970218df6a32527c15868c4a5
78 lines
1.9 KiB
JavaScript
78 lines
1.9 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
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import type {SchemaType} from '../../../packages/react-native-codegen/src/CodegenSchema.js';
|
|
|
|
const SwitchSchema: SchemaType = {
|
|
modules: {
|
|
ActivityIndicatorSchema: {
|
|
components: {
|
|
ActivityIndicatorView: {
|
|
paperComponentName: 'RCTActivityIndicatorView',
|
|
extendsProps: [
|
|
{
|
|
type: 'ReactNativeBuiltInType',
|
|
knownTypeName: 'ReactNativeCoreViewProps',
|
|
},
|
|
],
|
|
events: [],
|
|
props: [
|
|
{
|
|
name: 'hidesWhenStopped',
|
|
optional: true,
|
|
typeAnnotation: {
|
|
type: 'BooleanTypeAnnotation',
|
|
default: false,
|
|
},
|
|
},
|
|
{
|
|
name: 'animating',
|
|
optional: true,
|
|
typeAnnotation: {
|
|
type: 'BooleanTypeAnnotation',
|
|
default: false,
|
|
},
|
|
},
|
|
{
|
|
name: 'color',
|
|
optional: true,
|
|
typeAnnotation: {
|
|
type: 'NativePrimitiveTypeAnnotation',
|
|
name: 'ColorPrimitive',
|
|
},
|
|
},
|
|
{
|
|
name: 'size',
|
|
optional: true,
|
|
typeAnnotation: {
|
|
type: 'StringEnumTypeAnnotation',
|
|
default: 'small',
|
|
options: [
|
|
{
|
|
name: 'small',
|
|
},
|
|
{
|
|
name: 'large',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
],
|
|
commands: [],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
module.exports = SwitchSchema;
|