mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
Add Button propsType
This commit is contained in:
parent
b52cb83295
commit
7c9892a9c7
@ -57,6 +57,17 @@ export default class Button extends React.Component {
|
||||
</button>;
|
||||
}
|
||||
}
|
||||
|
||||
Button.propTypes = {
|
||||
type: React.PropTypes.string,
|
||||
shape: React.PropTypes.string,
|
||||
size: React.PropTypes.string,
|
||||
htmlType: React.PropTypes.string,
|
||||
onClick: React.PropTypes.func,
|
||||
loading: React.PropTypes.bool,
|
||||
className: React.PropTypes.string,
|
||||
};
|
||||
|
||||
Button.defaultProps = {
|
||||
onClick() {},
|
||||
};
|
||||
|
@ -22,13 +22,13 @@ var App = React.createClass({
|
||||
},
|
||||
render() {
|
||||
return <div>
|
||||
<Button type="primary" size="large" loading>
|
||||
<Button type="primary" size="large" loading={true}>
|
||||
加载中
|
||||
</Button>
|
||||
<Button type="primary" loading="true">
|
||||
<Button type="primary" loading={true}>
|
||||
加载中
|
||||
</Button>
|
||||
<Button type="primary" size="small" loading>
|
||||
<Button type="primary" size="small" loading={true}>
|
||||
加载中
|
||||
</Button>
|
||||
<br />
|
||||
|
Loading…
Reference in New Issue
Block a user