mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-06 17:34:07 +08:00
Use Generated ActivityIndicatorView Schema
Summary: We are now generating the native cpp files for ActivityIndicatorView via Buck. Deleting the hand written files and switching over. Reviewed By: TheSavior Differential Revision: D14247446 fbshipit-source-id: 63a6df3254e4184de6c8abb9ea2c89654ad54398
This commit is contained in:
committed by
Facebook Github Bot
parent
6e0f2bc8b3
commit
858efb222e
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* 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: {
|
||||
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: 'styleAttr',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'StringTypeAnnotation',
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'color',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'NativePrimitiveTypeAnnotation',
|
||||
name: 'ColorPrimitive',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'size',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'StringEnumTypeAnnotation',
|
||||
default: 'Small',
|
||||
options: [
|
||||
{
|
||||
name: 'small',
|
||||
},
|
||||
{
|
||||
name: 'large',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'intermediate',
|
||||
optional: true,
|
||||
typeAnnotation: {
|
||||
type: 'BooleanTypeAnnotation',
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = SwitchSchema;
|
||||
@@ -7,8 +7,9 @@
|
||||
|
||||
#import "RCTActivityIndicatorViewComponentView.h"
|
||||
|
||||
#import <react/components/activityindicator/ActivityIndicatorViewProps.h>
|
||||
#import <react/components/activityindicator/ActivityIndicatorViewShadowNode.h>
|
||||
#import <react/components/rncore/EventEmitters.h>
|
||||
#import <react/components/rncore/Props.h>
|
||||
#import <react/components/rncore/ShadowNodes.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user