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:
Rick Hanlon
2019-03-02 12:52:45 -08:00
committed by Facebook Github Bot
parent 6e0f2bc8b3
commit 858efb222e
2 changed files with 94 additions and 2 deletions

View File

@@ -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;

View File

@@ -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;