Skip to content

Commit 9202d4f

Browse files
mdvaccafacebook-github-bot
authored andcommitted
- Created schema for AndroidSwipeRefreshLayoutSchema
Summary: Created schema for AndroidSwipeRefreshLayoutSchema component Reviewed By: shergin Differential Revision: D14817451 fbshipit-source-id: 22e8f71e476cd51ea61ce83f26c69ae71bbdafb5
1 parent 33b55cc commit 9202d4f

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @format
8+
* @flow
9+
*/
10+
'use strict';
11+
12+
import type {SchemaType} from '../../../packages/react-native-codegen/src/CodegenSchema.js';
13+
14+
const AndroidSwipeRefreshLayoutSchema: SchemaType = {
15+
modules: {
16+
AndroidSwipeRefreshLayout: {
17+
components: {
18+
AndroidSwipeRefreshLayout: {
19+
extendsProps: [
20+
{
21+
type: 'ReactNativeBuiltInType',
22+
knownTypeName: 'ReactNativeCoreViewProps',
23+
},
24+
],
25+
events: [
26+
{
27+
name: 'onRefresh',
28+
optional: true,
29+
bubblingType: 'bubble',
30+
typeAnnotation: {
31+
type: 'EventTypeAnnotation',
32+
argument: {
33+
type: 'ObjectTypeAnnotation',
34+
properties: [],
35+
},
36+
},
37+
},
38+
],
39+
props: [
40+
{
41+
name: 'enabled',
42+
optional: true,
43+
typeAnnotation: {
44+
type: 'BooleanTypeAnnotation',
45+
default: true,
46+
},
47+
},
48+
{
49+
name: 'colors',
50+
optional: true,
51+
typeAnnotation: {
52+
type: 'ArrayTypeAnnotation',
53+
elementType: {
54+
type: 'NativePrimitiveTypeAnnotation',
55+
name: 'ColorPrimitive',
56+
},
57+
},
58+
},
59+
{
60+
name: 'progressBackgroundColor',
61+
optional: true,
62+
typeAnnotation: {
63+
type: 'NativePrimitiveTypeAnnotation',
64+
name: 'ColorPrimitive',
65+
},
66+
},
67+
{
68+
name: 'size',
69+
optional: true,
70+
typeAnnotation: {
71+
type: 'Int32TypeAnnotation',
72+
default: 1,
73+
},
74+
},
75+
{
76+
name: 'progressViewOffset',
77+
optional: true,
78+
typeAnnotation: {
79+
type: 'FloatTypeAnnotation',
80+
default: 0,
81+
},
82+
},
83+
{
84+
name: 'refreshing',
85+
optional: false,
86+
typeAnnotation: {
87+
type: 'BooleanTypeAnnotation',
88+
default: false,
89+
},
90+
},
91+
],
92+
},
93+
},
94+
},
95+
},
96+
};
97+
98+
module.exports = AndroidSwipeRefreshLayoutSchema;

0 commit comments

Comments
 (0)