From 63c7391aa83d7c701f22f695c5a86095266e2d9f Mon Sep 17 00:00:00 2001 From: Toluwalope Adeoye Date: Sat, 24 Feb 2024 19:29:03 +0100 Subject: [PATCH] Update index.js added background color option --- src/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index b437e81..8615bd7 100644 --- a/src/index.js +++ b/src/index.js @@ -15,7 +15,7 @@ export default class PullToRefresh extends Component { textError: PropTypes.string, textStart: PropTypes.string, textReady: PropTypes.string, - textRefresh: PropTypes.string + textRefresh: PropTypes.string, }; constructor(props) { @@ -49,6 +49,11 @@ export default class PullToRefresh extends Component { this.listLabel[3] = this.props.textRefresh || this.listLabel[3] } + const contentBackgroundColor = + this.props.options && this.props.options.contentBackgroundColor + ? this.props.options.contentBackgroundColor + : '' + componentDidMount() { this.setState({ isMounted: true }) this.checkListLabel() @@ -256,7 +261,7 @@ export default class PullToRefresh extends Component { style={{ height: this.state.height + 'px' }} ref={this.pullDownHeader} > -
+