mirror of https://github.com/Lissy93/dashy.git
📦 Creates reusable Button component
This commit is contained in:
parent
ba824b1f9a
commit
eee99d1ffe
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue