Skip to content

Conversation

@jrdn91
Copy link

@jrdn91 jrdn91 commented Nov 9, 2018

Had this issue when I made the button background white and the text color black, it did not apply to the spinner. Figure it was an easy fix :)

Copy link
Owner

@vahissan vahissan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. We need to support StyleSheet instead of regular objects.

renderLoadingAnim() {
if (this.props.isLoading) {
let color = this.props.flat ? this.props.color : '#ffffff';
if (this.props.hasOwnProperty('textStyle') && this.props.textStyle.hasOwnProperty('color')) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

textStyle may not always be a plain object. Please consider StyleSheet as well. Or take textColor as a prop instead,

textStyle: PropTypes.number || PropTypes.object,
style: PropTypes.object,
textStyle: PropTypes.object,
containerStyle: PropTypes.object,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not always an object. Need to support StyleSheet too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants