From 0ae994de5660ceff411c0621f5a09c9a254c2c62 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 Sep 2021 19:15:28 +0530 Subject: [PATCH] Added className prop to button comp --- src/app/atoms/button/Button.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/atoms/button/Button.jsx b/src/app/atoms/button/Button.jsx index b6e4a0f..bfe06f6 100644 --- a/src/app/atoms/button/Button.jsx +++ b/src/app/atoms/button/Button.jsx @@ -7,26 +7,29 @@ import RawIcon from '../system-icons/RawIcon'; import { blurOnBubbling } from './script'; function Button({ - id, variant, iconSrc, type, onClick, children, disabled, + id, className, variant, iconSrc, + type, onClick, children, disabled, }) { const iconClass = (iconSrc === null) ? '' : `btn-${variant}--icon`; return ( ); } Button.defaultProps = { id: '', + className: null, variant: 'surface', iconSrc: null, type: 'button', @@ -36,6 +39,7 @@ Button.defaultProps = { Button.propTypes = { id: PropTypes.string, + className: PropTypes.string, variant: PropTypes.oneOf(['surface', 'primary', 'caution', 'danger']), iconSrc: PropTypes.string, type: PropTypes.oneOf(['button', 'submit']),