-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Created schema for AndroidSwipeRefreshLayoutSchema
Summary: Created schema for AndroidSwipeRefreshLayoutSchema component Reviewed By: shergin Differential Revision: D14817451 fbshipit-source-id: 22e8f71e476cd51ea61ce83f26c69ae71bbdafb5
- Loading branch information
1 parent
33b55cc
commit 9202d4f
Showing
1 changed file
with
98 additions
and
0 deletions.
There are no files selected for viewing
98 changes: 98 additions & 0 deletions
98
Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutSchema.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
/** | ||
* 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 AndroidSwipeRefreshLayoutSchema: SchemaType = { | ||
modules: { | ||
AndroidSwipeRefreshLayout: { | ||
components: { | ||
AndroidSwipeRefreshLayout: { | ||
extendsProps: [ | ||
{ | ||
type: 'ReactNativeBuiltInType', | ||
knownTypeName: 'ReactNativeCoreViewProps', | ||
}, | ||
], | ||
events: [ | ||
{ | ||
name: 'onRefresh', | ||
optional: true, | ||
bubblingType: 'bubble', | ||
typeAnnotation: { | ||
type: 'EventTypeAnnotation', | ||
argument: { | ||
type: 'ObjectTypeAnnotation', | ||
properties: [], | ||
}, | ||
}, | ||
}, | ||
], | ||
props: [ | ||
{ | ||
name: 'enabled', | ||
optional: true, | ||
typeAnnotation: { | ||
type: 'BooleanTypeAnnotation', | ||
default: true, | ||
}, | ||
}, | ||
{ | ||
name: 'colors', | ||
optional: true, | ||
typeAnnotation: { | ||
type: 'ArrayTypeAnnotation', | ||
elementType: { | ||
type: 'NativePrimitiveTypeAnnotation', | ||
name: 'ColorPrimitive', | ||
}, | ||
}, | ||
}, | ||
{ | ||
name: 'progressBackgroundColor', | ||
optional: true, | ||
typeAnnotation: { | ||
type: 'NativePrimitiveTypeAnnotation', | ||
name: 'ColorPrimitive', | ||
}, | ||
}, | ||
{ | ||
name: 'size', | ||
optional: true, | ||
typeAnnotation: { | ||
type: 'Int32TypeAnnotation', | ||
default: 1, | ||
}, | ||
}, | ||
{ | ||
name: 'progressViewOffset', | ||
optional: true, | ||
typeAnnotation: { | ||
type: 'FloatTypeAnnotation', | ||
default: 0, | ||
}, | ||
}, | ||
{ | ||
name: 'refreshing', | ||
optional: false, | ||
typeAnnotation: { | ||
type: 'BooleanTypeAnnotation', | ||
default: false, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
module.exports = AndroidSwipeRefreshLayoutSchema; |