From aa8e0cf57ab6e15a9db2c23cecc3151a344ea517 Mon Sep 17 00:00:00 2001 From: Kelly Dwan Date: Mon, 14 Nov 2016 17:54:33 -0500 Subject: [PATCH] Pull the non-html props out of the button props, fixes unknown props error --- client/components/button/index.jsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/client/components/button/index.jsx b/client/components/button/index.jsx index 84d6556..5903230 100644 --- a/client/components/button/index.jsx +++ b/client/components/button/index.jsx @@ -33,16 +33,17 @@ export default React.createClass( { }, render() { + const { compact, primary, scary, borderless, ...htmlProps } = this.props; const element = this.props.href ? 'a' : 'button'; const buttonClasses = classNames( { 'dops-button': true, - 'is-compact': this.props.compact, - 'is-primary': this.props.primary, - 'is-scary': this.props.scary, - 'is-borderless': this.props.borderless + 'is-compact': compact, + 'is-primary': primary, + 'is-scary': scary, + 'is-borderless': borderless } ); - const props = assign( {}, this.props, { + const props = assign( {}, htmlProps, { className: classNames( this.props.className, buttonClasses ) } );