mirror of
https://github.com/status-im/react-native.git
synced 2025-02-24 15:18:10 +00:00
Summary: This is the first step in organizing React Native slightly differently. This doesn't set up a "monorepo" structure for the GitHub repo yet, it merely moves a few files around and I slightly updated the package.json file for the codegen project. Reviewed By: rickhanlonii, TheSavior Differential Revision: D13974180 fbshipit-source-id: f53375f3b6618ef12658064cb1fc690ef1f95299
95 lines
2.4 KiB
JavaScript
95 lines
2.4 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: {
|
|
Switch: {
|
|
components: {
|
|
Switch: {
|
|
extendsProps: [
|
|
{
|
|
type: 'ReactNativeBuiltInType',
|
|
knownTypeName: 'ReactNativeCoreViewProps',
|
|
},
|
|
],
|
|
events: [
|
|
{
|
|
name: 'onChange',
|
|
optional: true,
|
|
bubblingType: 'bubble',
|
|
typeAnnotation: {
|
|
type: 'EventTypeAnnotation',
|
|
argument: {
|
|
type: 'ObjectTypeAnnotation',
|
|
properties: [
|
|
{
|
|
type: 'BooleanTypeAnnotation',
|
|
name: 'value',
|
|
optional: false,
|
|
},
|
|
],
|
|
},
|
|
},
|
|
},
|
|
],
|
|
props: [
|
|
{
|
|
name: 'disabled',
|
|
optional: true,
|
|
typeAnnotation: {
|
|
type: 'BooleanTypeAnnotation',
|
|
default: false,
|
|
},
|
|
},
|
|
{
|
|
name: 'value',
|
|
optional: true,
|
|
typeAnnotation: {
|
|
type: 'BooleanTypeAnnotation',
|
|
default: false,
|
|
},
|
|
},
|
|
{
|
|
name: 'tintColor',
|
|
optional: true,
|
|
typeAnnotation: {
|
|
type: 'NativePrimitiveTypeAnnotation',
|
|
name: 'ColorPrimitive',
|
|
},
|
|
},
|
|
{
|
|
name: 'onTintColor',
|
|
optional: true,
|
|
typeAnnotation: {
|
|
type: 'NativePrimitiveTypeAnnotation',
|
|
name: 'ColorPrimitive',
|
|
},
|
|
},
|
|
{
|
|
name: 'thumbTintColor',
|
|
optional: true,
|
|
typeAnnotation: {
|
|
type: 'NativePrimitiveTypeAnnotation',
|
|
name: 'ColorPrimitive',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
module.exports = SwitchSchema;
|