@fortawesome/free-solid-svg-icons#faReplyAll TypeScript Examples
The following examples show how to use
@fortawesome/free-solid-svg-icons#faReplyAll.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ThreadPointsBar.tsx From Full-Stack-React-TypeScript-and-Node with MIT License | 6 votes |
ThreadPointsBar: FC<ThreadPointsBarProps> = ({
points,
responseCount,
}) => {
const { width } = useWindowDimensions();
if (width > 768) {
return (
<div className="threadcard-points">
<div className="threadcard-points-item">
{points}
<br />
<FontAwesomeIcon icon={faHeart} className="points-icon" />
</div>
<div className="threadcard-points-item">
{responseCount}
<br />
<FontAwesomeIcon icon={faReplyAll} className="points-icon" />
</div>
</div>
);
}
return null;
}
Example #2
Source File: ThreadPointsBar.tsx From Full-Stack-React-TypeScript-and-Node with MIT License | 5 votes |
ThreadPointsBar: FC<ThreadPointsBarProps> = ({
points,
responseCount,
threadId,
allowUpdatePoints,
refreshThread,
}) => {
const { width } = useWindowDimensions();
const { onClickDecThreadPoint, onClickIncThreadPoint } = useUpdateThreadPoint(
refreshThread,
threadId
);
if (width > 768) {
console.log("ThreadPointsBar points", points);
return (
<div className="threadcard-points">
<div className="threadcard-points-item">
<div
className="threadcard-points-item-btn"
style={{ display: `${allowUpdatePoints ? "block" : "none"}` }}
>
<FontAwesomeIcon
icon={faChevronUp}
className="point-icon"
onClick={onClickIncThreadPoint}
/>
</div>
{points}
<div
className="threadcard-points-item-btn"
style={{ display: `${allowUpdatePoints ? "block" : "none"}` }}
>
<FontAwesomeIcon
icon={faChevronDown}
className="point-icon"
onClick={onClickDecThreadPoint}
/>
</div>
<FontAwesomeIcon icon={faHeart} className="points-icon" />
</div>
<div className="threadcard-points-item">
{responseCount}
<br />
<FontAwesomeIcon icon={faReplyAll} className="points-icon" />
</div>
</div>
);
}
return null;
}
Example #3
Source File: ThreadCard.tsx From Full-Stack-React-TypeScript-and-Node with MIT License | 4 votes |
ThreadCard: FC<ThreadCardProps> = ({ thread }) => {
const history = useHistory();
const { width } = useWindowDimensions();
const onClickShowThread = (e: React.MouseEvent<HTMLDivElement>) => {
history.push("/thread/" + thread.id);
};
const getResponses = (thread: Thread) => {
if (width <= 768) {
return (
<label
style={{
marginRight: ".5em",
}}
>
{thread && thread.threadItems && thread.threadItems.length}
<FontAwesomeIcon
icon={faReplyAll}
className="points-icon"
style={{
marginLeft: ".25em",
marginTop: "-.25em",
}}
/>
</label>
);
}
return null;
};
return (
<section className="panel threadcard-container">
<div className="threadcard-txt-container">
<div className="content-header">
<Link
to={`/categorythreads/${thread.category.id}`}
className="link-txt"
>
<strong>{thread.category.name}</strong>
</Link>
<span className="username-header" style={{ marginLeft: ".5em" }}>
{thread.userName}
</span>
</div>
<div className="question">
<div
onClick={onClickShowThread}
data-thread-id={thread.id}
style={{ marginBottom: ".4em" }}
>
<strong>{thread.title}</strong>
</div>
<div
className="threadcard-body"
onClick={onClickShowThread}
data-thread-id={thread.id}
>
<div>{thread.body}</div>
</div>
<div className="threadcard-footer">
<span
style={{
marginRight: ".5em",
}}
>
<label>
{thread.views}
<FontAwesomeIcon icon={faEye} className="icon-lg" />
</label>
</span>
<span>
{width <= 768 ? (
<ThreadPointsInline points={thread?.points || 0} />
) : null}
{getResponses(thread)}
</span>
</div>
</div>
</div>
<ThreadPointsBar
points={thread?.points || 0}
responseCount={
thread && thread.threadItems && thread.threadItems.length
}
/>
</section>
);
}
Example #4
Source File: ThreadCard.tsx From Full-Stack-React-TypeScript-and-Node with MIT License | 4 votes |
ThreadCard: FC<ThreadCardProps> = ({ thread }) => {
const history = useHistory();
const { width } = useWindowDimensions();
const onClickShowThread = (e: React.MouseEvent<HTMLDivElement>) => {
history.push("/thread/" + thread.id);
};
const getResponseCount = (thread: Thread) => {
if (width <= 768) {
return (
<span
style={{
marginRight: ".5em",
}}
>
{thread && thread.threadItems && thread.threadItems.length}
<FontAwesomeIcon
icon={faReplyAll}
className="points-icon"
style={{
marginLeft: ".25em",
marginTop: "-.25em",
}}
/>
</span>
);
}
return null;
};
return (
<section className="panel threadcard-container">
<div className="threadcard-txt-container">
<div className="content-header">
<Link
to={`/categorythreads/${thread.category.id}`}
className="link-txt"
>
<strong>{thread.category.name}</strong>
</Link>
<span className="username-header" style={{ marginLeft: ".5em" }}>
{thread.user.userName}
</span>
</div>
<div className="question">
<div
onClick={onClickShowThread}
data-thread-id={thread.id}
style={{ marginBottom: ".4em" }}
>
<strong>{thread.title}</strong>
</div>
<div
className="threadcard-body"
onClick={onClickShowThread}
data-thread-id={thread.id}
>
<RichEditor existingBody={thread.body} readOnly={true} />
</div>
<div className="threadcard-footer">
<span
style={{
marginRight: ".5em",
}}
>
{thread.views}
<FontAwesomeIcon icon={faEye} className="icon-lg" />
</span>
{width <= 768 ? (
<ThreadPointsInline points={thread?.points || 0} />
) : null}
{getResponseCount(thread)}
</div>
</div>
</div>
<ThreadPointsBar
points={thread?.points || 0}
responseCount={
thread && thread.threadItems && thread.threadItems.length
}
/>
</section>
);
}