diff --git a/Button.js b/Button.js index 3cdb551..ed1861e 100644 --- a/Button.js +++ b/Button.js @@ -28,6 +28,7 @@ class Button extends Component { allowFontScaling: PropTypes.bool, isLoading: PropTypes.bool, isDisabled: PropTypes.bool, + activityIndicator: PropTypes.object, activityIndicatorColor: PropTypes.string, delayLongPress: PropTypes.number, delayPressIn: PropTypes.number, @@ -70,6 +71,10 @@ class Button extends Component { _renderInnerText() { if (this.props.isLoading) { + if (this.props.activityIndicator) { + return this.props.activityIndicator; + } + return ( Hello + + ) + const tree = component.toJSON() + expect(tree).toMatchSnapshot() + }) test('Renders with a inner View', () => { const component = renderer.create(