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> {
|
||||
public render() {
|
||||
let classes
|
||||
const { primary, link, href, children } = this.props
|
||||
const { primary, link, href, children, ...props } = this.props
|
||||
|
||||
if (primary) {
|
||||
classes = styles.buttonPrimary
|
||||
@ -22,11 +22,11 @@ export default class Button extends PureComponent<IButtonProps, any> {
|
||||
}
|
||||
|
||||
return href ? (
|
||||
<a href={href} className={classes} {...this.props}>
|
||||
<a href={href} className={classes} {...props}>
|
||||
{children}
|
||||
</a>
|
||||
) : (
|
||||
<button className={classes} {...this.props}>
|
||||
<button className={classes} {...props}>
|
||||
{children}
|
||||
</button>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user