@fortawesome/free-solid-svg-icons#faHeart TypeScript Examples
The following examples show how to use
@fortawesome/free-solid-svg-icons#faHeart.
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: IconLibrary.ts From react-memory-game with MIT License | 6 votes |
library.add(
faChevronLeft,
faPlay,
faPause,
faUndo,
faClock,
faQuestionCircle,
faTimes,
faPalette,
// Icons for the game
faPoo,
faAnchor,
faMoon,
faAppleAlt,
faBell,
faBible,
faBomb,
faBone,
faCar,
faCat,
faChess,
faSkull,
faFeatherAlt,
faFire,
faHeart,
faMusic,
)
Example #2
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 #3
Source File: ThreadPointsInline.tsx From Full-Stack-React-TypeScript-and-Node with MIT License | 6 votes |
ThreadPointsInline: FC<ThreadPointsBarProps> = ({
points,
responseCount,
}) => {
return (
<React.Fragment>
<label
style={{
marginRight: ".75em",
marginTop: ".25em",
}}
>
{points || 0}
<FontAwesomeIcon
icon={faHeart}
className="points-icon"
style={{
marginLeft: ".2em",
}}
/>
</label>
</React.Fragment>
);
}
Example #4
Source File: index.tsx From bad-cards-game with GNU Affero General Public License v3.0 | 6 votes |
library.add( faDotCircle, faCircle, faBars, faTimes, faInfoCircle, faTrophy, faShareSquare, faHeart, faInstagram, faTwitter, faGithub, faFacebook, faHandPointRight, faEdit, faSave, faCamera, faPlus, faMinus, faRandom, );
Example #5
Source File: fa-library.ts From eth2stats-dashboard with MIT License | 5 votes |
library.add(faBell, faChevronDown, faTimes, faArrowRight, faCheck, faPlusCircle, faExclamationCircle, faHeart, faCodeBranch, faMap, faList, faCircle, faDotCircle, faCheckCircle, faNetworkWired, faUsers, faCube, faSortUp, faSortDown, faEllipsisV, faSync, faMicrochip, faCheckDouble, faLaptopCode);
Example #6
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 #7
Source File: ThreadPointsInline.tsx From Full-Stack-React-TypeScript-and-Node with MIT License | 5 votes |
ThreadPointsInline: FC<ThreadPointsInlineProps> = ({
points,
threadId,
threadItemId,
allowUpdatePoints,
refreshThread,
}) => {
const [execUpdateThreadItemPoint] = useMutation(UpdateThreadItemPoint);
const { onClickDecThreadPoint, onClickIncThreadPoint } = useUpdateThreadPoint(
refreshThread,
threadId
);
const onClickIncThreadItemPoint = async (
e: React.MouseEvent<SVGSVGElement, MouseEvent>
) => {
e.preventDefault();
await execUpdateThreadItemPoint({
variables: {
threadItemId,
increment: true,
},
});
refreshThread && refreshThread();
};
const onClickDecThreadItemPoint = async (
e: React.MouseEvent<SVGSVGElement, MouseEvent>
) => {
e.preventDefault();
await execUpdateThreadItemPoint({
variables: {
threadItemId,
increment: false,
},
});
refreshThread && refreshThread();
};
return (
<span className="threadpointsinline-item">
<div
className="threadpointsinline-item-btn"
style={{ display: `${allowUpdatePoints ? "block" : "none"}` }}
>
<FontAwesomeIcon
icon={faChevronUp}
className="point-icon"
onClick={threadId ? onClickIncThreadPoint : onClickIncThreadItemPoint}
/>
</div>
{points}
<div
className="threadpointsinline-item-btn"
style={{ display: `${allowUpdatePoints ? "block" : "none"}` }}
>
<FontAwesomeIcon
icon={faChevronDown}
className="point-icon"
onClick={threadId ? onClickDecThreadPoint : onClickDecThreadItemPoint}
/>
</div>
<div className="threadpointsinline-item-btn">
<FontAwesomeIcon icon={faHeart} className="points-icon" />
</div>
</span>
);
}
Example #8
Source File: navigation.component.ts From dating-client with MIT License | 5 votes |
heartIcon = faHeart as IconProp;