mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-26 23:24:38 +02:00
📦 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 }) {
|
export default function Button({ children, to, color }) {
|
||||||
return (
|
return (
|
||||||
<Link to={to}>
|
<Link to={to} className="button-link-wrapper">
|
||||||
<button className={clsx('button', color && 'color-btn', `btn-${color}`)}>
|
<button className={clsx('button', color && 'color-btn', `btn-${color}`)}>
|
||||||
{children}
|
{children}
|
||||||
</button>
|
</button>
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
|
|
||||||
|
.button-link-wrapper:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -13,6 +17,12 @@
|
|||||||
padding: 0.75rem 1rem;
|
padding: 0.75rem 1rem;
|
||||||
margin: 0.5rem;
|
margin: 0.5rem;
|
||||||
color: var(--black);
|
color: var(--black);
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
width: 1.8rem;
|
||||||
|
margin-right: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
&.color-btn:hover {
|
&.color-btn:hover {
|
||||||
color: #000000b3;
|
color: #000000b3;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user