mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
按钮点击事件和禁用效果。
This commit is contained in:
parent
5f04c9f7ed
commit
123cfec441
@ -31,7 +31,7 @@ class EWorkspace extends React.Component {
|
||||
<FormControl>
|
||||
<Label>Button</Label>
|
||||
<Button onClick={() => { alert('Default!'); }}>Default</Button>
|
||||
<Button color={'primary1'}>Primary</Button>
|
||||
<Button color={'primary'}>Primary</Button>
|
||||
<Button color={'success'}>Success</Button>
|
||||
<Button color={'warn'}>Warn</Button>
|
||||
<Button color={'danger'}>Danger</Button>
|
||||
|
||||
@ -18,7 +18,7 @@ class Button extends React.Component {
|
||||
Button.propTypes = {
|
||||
className: PropTypes.string,
|
||||
style: PropTypes.object,
|
||||
children: PropTypes.element,
|
||||
children: PropTypes.node,
|
||||
color: PropTypes.oneOf(['primary', 'success', 'warn', 'danger']),
|
||||
disabled: PropTypes.bool,
|
||||
};
|
||||
@ -27,6 +27,7 @@ Button.defaultProps = {
|
||||
className: null,
|
||||
style: null,
|
||||
children: null,
|
||||
color: null,
|
||||
disabled: false,
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user