From a01e895e30e2c8abd41d2649e1c9c47138e3b343 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 17 Sep 2017 02:10:32 +0200 Subject: [PATCH] [change] RefreshControl placeholder Fix #638 Close #644 --- src/components/RefreshControl/index.js | 57 +++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/src/components/RefreshControl/index.js b/src/components/RefreshControl/index.js index 0a818b1a..7b00f2a3 100644 --- a/src/components/RefreshControl/index.js +++ b/src/components/RefreshControl/index.js @@ -1,2 +1,55 @@ -import UnimplementedView from '../UnimplementedView'; -export default UnimplementedView; +/** + * Copyright (c) 2017-present, Nicolas Gallagher. + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + * + * @providesModule RefreshControl + * @flow + */ + +import ColorPropType from '../../propTypes/ColorPropType'; +import View from '../View'; +import ViewPropTypes from '../View/ViewPropTypes'; +import { arrayOf, bool, func, number, oneOf, string } from 'prop-types'; +import React, { Component } from 'react'; + +class RefreshControl extends Component { + static propTypes = { + ...ViewPropTypes, + colors: arrayOf(ColorPropType), + enabled: bool, + onRefresh: func, + progressBackgroundColor: ColorPropType, + progressViewOffset: number, + refreshing: bool.isRequired, + size: oneOf([0, 1]), + tintColor: ColorPropType, + title: string, + titleColor: ColorPropType + }; + + render() { + const { + /* eslint-disable */ + colors, + enabled, + onRefresh, + progressBackgroundColor, + progressViewOffset, + refreshing, + size, + tintColor, + title, + titleColor, + /* eslint-enable */ + ...rest + } = this.props; + + return ; + } +} + +export default RefreshControl;