Implemented icon & link support for the Icon component
This commit is contained in:
parent
bf20e3b896
commit
2e9c5cde70
@ -2,7 +2,12 @@ import "./styles.sass";
|
|||||||
|
|
||||||
const Button = (props) => {
|
const Button = (props) => {
|
||||||
return (
|
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>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,15 @@
|
|||||||
border-radius: 14px
|
border-radius: 14px
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
transition: all ease-in 0.1s
|
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
|
.primary-btn:hover
|
||||||
background-color: $primary-hover
|
background-color: $primary-hover
|
Loading…
x
Reference in New Issue
Block a user