@fortawesome/free-solid-svg-icons#faTrophy JavaScript Examples

The following examples show how to use @fortawesome/free-solid-svg-icons#faTrophy. 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: PodiumListItem.js    From ponce-tournois-mario-kart with MIT License 6 votes vote down vote up
function PodiumListItem({ podium, canManage }) {
    const [showForm, setShowForm] = useState(false);

    const openForm = () => {
        if (!showForm && canManage) setShowForm(true);
    };

    const closeForm = () => {
        setShowForm(false);
    };

    return (
        <Col xs={12} lg={showForm ? 12 : 4} onClick={openForm}>
            <div
                className={`podium__player ${
                    !showForm && canManage ? 'podium__addPlayer' : ''
                }`}
            >
                {showForm ? (
                    <EditPlayerForm closeForm={closeForm} podium={podium} />
                ) : (
                    <>
                        <FontAwesomeIcon
                            icon={faTrophy}
                            className="podium__playerTrophy"
                            color={getPositionColor(podium.position)}
                        />
                        {podium.player}
                    </>
                )}
            </div>
        </Col>
    );
}