mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
b063c41782
Summary: Adds the codgen types and generated view config for PullToRefresh Reviewed By: TheSavior Differential Revision: D15900138 fbshipit-source-id: ee2c179317749182aaf6d3b90c8379ce06a82b9c
49 lines
1.1 KiB
JavaScript
49 lines
1.1 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 {BubblingEvent, WithDefault} from '../../Types/CodegenTypes';
|
|
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
|
import type {ViewProps} from '../View/ViewPropTypes';
|
|
|
|
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
|
|
|
|
type NativeProps = $ReadOnly<{|
|
|
...ViewProps,
|
|
|
|
/**
|
|
* The color of the refresh indicator.
|
|
*/
|
|
tintColor?: ?ColorValue,
|
|
/**
|
|
* Title color.
|
|
*/
|
|
titleColor?: ?ColorValue,
|
|
/**
|
|
* The title displayed under the refresh indicator.
|
|
*/
|
|
title?: ?WithDefault<string, null>,
|
|
|
|
/**
|
|
* Called when the view starts refreshing.
|
|
*/
|
|
onRefresh?: ?(event: BubblingEvent<null>) => mixed,
|
|
|
|
/**
|
|
* Whether the view should be indicating an active refresh.
|
|
*/
|
|
refreshing: WithDefault<boolean, false>,
|
|
|}>;
|
|
|
|
export default codegenNativeComponent<NativeProps>('PullToRefresh', {
|
|
paperComponentName: 'RCTRefreshControl',
|
|
});
|