Created
January 21, 2020 10:45
-
-
Save DmitryOlkhovoi/069826d7c60e2e160033fad08f58e4cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> { | |
primary?: boolean, | |
accent?: boolean, | |
additionalClass?: string, | |
} | |
... | |
const classNames = classnames( | |
'btn', | |
{ | |
primary | |
}, | |
{ | |
accent | |
}, | |
additionalClass | |
); | |
... | |
<button className={classNames} {...props}>props.children</button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment