mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
added counter
This commit is contained in:
parent
5f1b11569a
commit
3e52ff1699
@ -4,12 +4,17 @@ import classnames from "classnames"
|
|||||||
import "./index.less"
|
import "./index.less"
|
||||||
|
|
||||||
export default (props) => {
|
export default (props) => {
|
||||||
return <a
|
return <div className="followButton">
|
||||||
|
<div className="counter">
|
||||||
|
{props.count}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
onClick={props.onClick}
|
onClick={props.onClick}
|
||||||
className={classnames(
|
className={classnames(
|
||||||
"followButton",
|
"btn",
|
||||||
{ ["followed"]: props.followed }
|
{ ["followed"]: props.followed }
|
||||||
)}>
|
)}>
|
||||||
<span>{props.followed ? "Following" : "Follow"}</span>
|
<span>{props.followed ? "Following" : "Follow"}</span>
|
||||||
</a>
|
</div>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,31 @@
|
|||||||
|
@borderRadius: 8px;
|
||||||
|
|
||||||
.followButton {
|
.followButton {
|
||||||
user-select: none;
|
display : inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
width : fit-content;
|
align-items : center;
|
||||||
height : 30px;
|
|
||||||
padding: 5px 15px;
|
|
||||||
|
|
||||||
text-decoration: none;
|
|
||||||
text-align : center;
|
|
||||||
vertical-align : middle;
|
|
||||||
letter-spacing : 1px;
|
|
||||||
|
|
||||||
transition: all 150ms ease-in-out;
|
transition: all 150ms ease-in-out;
|
||||||
|
outline : 1px solid var(--border-color);
|
||||||
|
|
||||||
border-radius: 8px;
|
border-radius: @borderRadius;
|
||||||
|
|
||||||
|
.counter {
|
||||||
|
padding: 5px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
width : 100px;
|
||||||
|
padding: 5px 15px;
|
||||||
|
|
||||||
|
cursor : pointer;
|
||||||
|
transition: all 150ms ease-in-out;
|
||||||
|
|
||||||
|
border-radius: @borderRadius;
|
||||||
|
border-left : 1.5px solid var(--border-color);
|
||||||
|
|
||||||
|
text-align : center;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
transition: all 150ms ease-in-out;
|
transition: all 150ms ease-in-out;
|
||||||
@ -43,6 +56,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes gradientMove {
|
@keyframes gradientMove {
|
||||||
0% {
|
0% {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user