2019-01-18 13:16:59 +03:00
|
|
|
/**
|
|
|
|
* 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';
|
|
|
|
|
2019-07-01 15:10:20 +03:00
|
|
|
import type {DirectEventHandler, WithDefault} from '../../Types/CodegenTypes';
|
2019-05-08 18:44:25 +03:00
|
|
|
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
|
|
|
import type {ViewProps} from '../View/ViewPropTypes';
|
2019-01-18 13:16:59 +03:00
|
|
|
|
2019-06-21 13:15:53 +03:00
|
|
|
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
|
2019-09-25 21:42:07 +03:00
|
|
|
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
|
2019-06-07 22:23:55 +03:00
|
|
|
|
2019-05-24 19:15:10 +03:00
|
|
|
type NativeProps = $ReadOnly<{|
|
2019-01-18 13:16:59 +03:00
|
|
|
...ViewProps,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The color of the refresh indicator.
|
|
|
|
*/
|
|
|
|
tintColor?: ?ColorValue,
|
|
|
|
/**
|
|
|
|
* Title color.
|
|
|
|
*/
|
|
|
|
titleColor?: ?ColorValue,
|
|
|
|
/**
|
|
|
|
* The title displayed under the refresh indicator.
|
|
|
|
*/
|
2019-07-02 12:59:04 +03:00
|
|
|
title?: WithDefault<string, null>,
|
2019-01-18 13:16:59 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Called when the view starts refreshing.
|
|
|
|
*/
|
2019-07-01 15:10:20 +03:00
|
|
|
onRefresh?: ?DirectEventHandler<null>,
|
2019-01-18 13:16:59 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether the view should be indicating an active refresh.
|
|
|
|
*/
|
2019-07-01 17:47:58 +03:00
|
|
|
refreshing: boolean,
|
2019-01-18 13:16:59 +03:00
|
|
|
|}>;
|
|
|
|
|
2019-08-09 20:06:53 +03:00
|
|
|
export default (codegenNativeComponent<NativeProps>('PullToRefreshView', {
|
2019-10-15 06:48:16 +03:00
|
|
|
paperComponentNameDeprecated: 'RCTRefreshControl',
|
2019-09-25 21:42:07 +03:00
|
|
|
}): HostComponent<NativeProps>);
|