📦 Creates reusable Button component

This commit is contained in:
Alicia Sykes 2021-06-28 21:25:26 +01:00
parent ba824b1f9a
commit eee99d1ffe
2 changed files with 11 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import './../styles/Button.scss';
export default function Button({ children, to, color }) {
return (
<Link to={to}>
<Link to={to} className="button-link-wrapper">
<button className={clsx('button', color && 'color-btn', `btn-${color}`)}>
{children}
</button>

View File

@ -1,4 +1,8 @@
.button-link-wrapper:hover {
text-decoration: none;
}
.button {
border-radius: 4px;
cursor: pointer;
@ -13,6 +17,12 @@
padding: 0.75rem 1rem;
margin: 0.5rem;
color: var(--black);
display: flex;
svg {
width: 1.8rem;
margin-right: 0.5rem;
}
&.color-btn:hover {
color: #000000b3;