mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
added comments counter
This commit is contained in:
parent
c13a70a3b2
commit
8e6f8a8a56
@ -0,0 +1,21 @@
|
||||
import React from "react"
|
||||
import { Button } from "antd"
|
||||
import { Icons } from "components/Icons"
|
||||
|
||||
import "./index.less"
|
||||
|
||||
export default (props) => {
|
||||
return <div
|
||||
className="comments_button"
|
||||
>
|
||||
<Button
|
||||
type="ghost"
|
||||
shape="circle"
|
||||
onClick={props.onClickComments}
|
||||
icon={<Icons.MessageCircle />}
|
||||
/>
|
||||
{
|
||||
props.count > 0 && <span className="comments_count">{props.count}</span>
|
||||
}
|
||||
</div>
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
.comments_button {
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
|
||||
align-items: center;
|
||||
|
||||
.comments_count {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@ import { Icons } from "components/Icons"
|
||||
|
||||
import SaveButton from "./saveButton"
|
||||
import LikeButton from "./likeButton"
|
||||
import CommentsButton from "./commentsButton"
|
||||
|
||||
import "./index.less"
|
||||
|
||||
@ -51,11 +52,9 @@ export default (props) => {
|
||||
/>
|
||||
</div>
|
||||
<div className="action" id="comments">
|
||||
<Button
|
||||
type="ghost"
|
||||
shape="circle"
|
||||
onClick={props.onClickComments}
|
||||
icon={<Icons.MessageCircle />}
|
||||
<CommentsButton
|
||||
onClickComments={props.onClickComments}
|
||||
count={props.commentsCount}
|
||||
/>
|
||||
</div>
|
||||
<div className="action" id="more">
|
||||
|
Loading…
x
Reference in New Issue
Block a user