Browse Source

update(propTypes): more restrictions on propTypes

pull/1208/head
闲耘™ 9 years ago
parent
commit
8d817e6eee
  1. 2
      components/button/button-group.jsx
  2. 8
      components/button/button.jsx

2
components/button/button-group.jsx

@ -24,5 +24,5 @@ export default class ButtonGroup extends React.Component {
}
}
ButtonGroup.propTypes = {
size: React.PropTypes.string,
size: React.PropTypes.oneOf(['large', 'small']),
};

8
components/button/button.jsx

@ -73,10 +73,10 @@ export default class Button extends React.Component {
}
Button.propTypes = {
type: React.PropTypes.string,
shape: React.PropTypes.string,
size: React.PropTypes.string,
htmlType: React.PropTypes.string,
type: React.PropTypes.oneOf(['primary', 'ghost', 'dashed']),
shape: React.PropTypes.oneOf(['circle', 'circle-outline']),
size: React.PropTypes.oneOf(['large', 'small']),
htmlType: React.PropTypes.oneOf(['submit', 'button', 'reset']),
onClick: React.PropTypes.func,
loading: React.PropTypes.bool,
className: React.PropTypes.string,

Loading…
Cancel
Save