mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +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 SaveButton from "./saveButton"
|
||||||
import LikeButton from "./likeButton"
|
import LikeButton from "./likeButton"
|
||||||
|
import CommentsButton from "./commentsButton"
|
||||||
|
|
||||||
import "./index.less"
|
import "./index.less"
|
||||||
|
|
||||||
@ -51,11 +52,9 @@ export default (props) => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="action" id="comments">
|
<div className="action" id="comments">
|
||||||
<Button
|
<CommentsButton
|
||||||
type="ghost"
|
onClickComments={props.onClickComments}
|
||||||
shape="circle"
|
count={props.commentsCount}
|
||||||
onClick={props.onClickComments}
|
|
||||||
icon={<Icons.MessageCircle />}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="action" id="more">
|
<div className="action" id="more">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user