mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
button DOM error fix
This commit is contained in:
parent
be1faa96de
commit
0a96175250
@ -11,7 +11,7 @@ interface IButtonProps {
|
|||||||
export default class Button extends PureComponent<IButtonProps, any> {
|
export default class Button extends PureComponent<IButtonProps, any> {
|
||||||
public render() {
|
public render() {
|
||||||
let classes
|
let classes
|
||||||
const { primary, link, href, children } = this.props
|
const { primary, link, href, children, ...props } = this.props
|
||||||
|
|
||||||
if (primary) {
|
if (primary) {
|
||||||
classes = styles.buttonPrimary
|
classes = styles.buttonPrimary
|
||||||
@ -22,11 +22,11 @@ export default class Button extends PureComponent<IButtonProps, any> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return href ? (
|
return href ? (
|
||||||
<a href={href} className={classes} {...this.props}>
|
<a href={href} className={classes} {...props}>
|
||||||
{children}
|
{children}
|
||||||
</a>
|
</a>
|
||||||
) : (
|
) : (
|
||||||
<button className={classes} {...this.props}>
|
<button className={classes} {...props}>
|
||||||
{children}
|
{children}
|
||||||
</button>
|
</button>
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user