update(propTypes): more restrictions on propTypes

This commit is contained in:
闲耘™ 2016-03-15 18:17:49 +08:00
parent 272d1a1136
commit 8d817e6eee
2 changed files with 5 additions and 5 deletions

View File

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

View File

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