Implemented icon & link support for the Icon component

This commit is contained in:
Mathias Wagner 2022-09-12 21:03:38 +02:00
parent bf20e3b896
commit 2e9c5cde70
2 changed files with 15 additions and 1 deletions

View File

@ -2,7 +2,12 @@ import "./styles.sass";
const Button = (props) => {
return (
<button className="primary-btn">{props.text}</button>
<a href={props.to} className="btn-link">
<button className="primary-btn">
{props.image ? <img src={props.image} alt="i" className="btn-icon"/> : <></>}
{props.text}
</button>
</a>
)
}

View File

@ -10,6 +10,15 @@
border-radius: 14px
cursor: pointer
transition: all ease-in 0.1s
display: flex
.btn-link
text-decoration: none
.btn-icon
width: 24px
margin-right: 10px
border-radius: 150px
.primary-btn:hover
background-color: $primary-hover