1
0
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:
Matthias Kretschmann 2019-01-24 14:18:32 +01:00
parent be1faa96de
commit 0a96175250
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -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>
) )