diff --git a/Libraries/Components/ActivityIndicator/ActivityIndicatorSchema.js b/Libraries/Components/ActivityIndicator/ActivityIndicatorSchema.js new file mode 100644 index 00000000000..d68552d7bc3 --- /dev/null +++ b/Libraries/Components/ActivityIndicator/ActivityIndicatorSchema.js @@ -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; diff --git a/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm index d6270063ba1..95f21877cc1 100644 --- a/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm @@ -7,8 +7,9 @@ #import "RCTActivityIndicatorViewComponentView.h" -#import -#import +#import +#import +#import using namespace facebook::react;