mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-14 04:12:53 +01:00
changing Button api
This commit is contained in:
parent
d6c5a56e5f
commit
2e5ad6ad43
2 changed files with 4 additions and 4 deletions
|
|
@ -2,9 +2,9 @@ import React from 'react';
|
|||
|
||||
import ls from './Button.less'
|
||||
|
||||
export default function Button({text, type, onClick}) {
|
||||
export default function Button({type, onClick, children}) {
|
||||
|
||||
return <button onClick={onClick} className={ls[type]}>{text}</button>
|
||||
return <button onClick={onClick} className={ls[type]}>{children}</button>
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ export default class Wizard extends React.Component {
|
|||
</Field>
|
||||
} )}
|
||||
<ButtonGroup>
|
||||
<Button text='Cancel' onClick={this.onClose} />
|
||||
<Button text='OK' type='accent' onClick={this.onOK} />
|
||||
<Button onClick={this.onClose} >Cancel</Button>
|
||||
<Button type='accent' onClick={this.onOK} >OK</Button>
|
||||
</ButtonGroup>
|
||||
{this.state.hasError && <div className={ls.errorMessage}>
|
||||
performing operation with current parameters leads to an invalid object
|
||||
|
|
|
|||
Loading…
Reference in a new issue