Update Button with correct proptypes
This commit is contained in:
parent
a5b5277a88
commit
1ab4ee3781
@ -17,16 +17,15 @@
|
|||||||
import React, { Component, PropTypes } from 'react';
|
import React, { Component, PropTypes } from 'react';
|
||||||
import { FlatButton } from 'material-ui';
|
import { FlatButton } from 'material-ui';
|
||||||
|
|
||||||
|
import { nodeOrStringProptype } from '~/util/proptypes';
|
||||||
|
|
||||||
export default class Button extends Component {
|
export default class Button extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
backgroundColor: PropTypes.string,
|
backgroundColor: PropTypes.string,
|
||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
disabled: PropTypes.bool,
|
disabled: PropTypes.bool,
|
||||||
icon: PropTypes.node,
|
icon: PropTypes.node,
|
||||||
label: PropTypes.oneOfType([
|
label: nodeOrStringProptype(),
|
||||||
React.PropTypes.string,
|
|
||||||
React.PropTypes.object
|
|
||||||
]),
|
|
||||||
onClick: PropTypes.func,
|
onClick: PropTypes.func,
|
||||||
primary: PropTypes.bool
|
primary: PropTypes.bool
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ function renderShallow (props) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
describe.only('ui/Button', () => {
|
describe('ui/Button', () => {
|
||||||
describe('rendering', () => {
|
describe('rendering', () => {
|
||||||
it('renders defaults', () => {
|
it('renders defaults', () => {
|
||||||
expect(renderShallow()).to.be.ok;
|
expect(renderShallow()).to.be.ok;
|
||||||
|
Loading…
Reference in New Issue
Block a user