From 1ab4ee37817c61e8f039e8320c6a0f9e725b5b98 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 8 Dec 2016 14:53:57 +0100 Subject: [PATCH] Update Button with correct proptypes --- js/src/ui/Button/button.js | 7 +++---- js/src/ui/Button/button.spec.js | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/js/src/ui/Button/button.js b/js/src/ui/Button/button.js index 48dbc981d..6ae113fd4 100644 --- a/js/src/ui/Button/button.js +++ b/js/src/ui/Button/button.js @@ -17,16 +17,15 @@ import React, { Component, PropTypes } from 'react'; import { FlatButton } from 'material-ui'; +import { nodeOrStringProptype } from '~/util/proptypes'; + export default class Button extends Component { static propTypes = { backgroundColor: PropTypes.string, className: PropTypes.string, disabled: PropTypes.bool, icon: PropTypes.node, - label: PropTypes.oneOfType([ - React.PropTypes.string, - React.PropTypes.object - ]), + label: nodeOrStringProptype(), onClick: PropTypes.func, primary: PropTypes.bool } diff --git a/js/src/ui/Button/button.spec.js b/js/src/ui/Button/button.spec.js index 1d5f5beed..9ae4ecdfc 100644 --- a/js/src/ui/Button/button.spec.js +++ b/js/src/ui/Button/button.spec.js @@ -25,7 +25,7 @@ function renderShallow (props) { ); } -describe.only('ui/Button', () => { +describe('ui/Button', () => { describe('rendering', () => { it('renders defaults', () => { expect(renderShallow()).to.be.ok;