react-icons/fi#FiUserCheck TypeScript Examples

The following examples show how to use react-icons/fi#FiUserCheck. 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: UserBox.tsx    From tobira with Apache License 2.0 5 votes vote down vote up
LoggedIn: React.FC<LoggedInProps> = ({ user, menu }) => {
    const { t } = useTranslation();
    const ref = useRef(null);

    return (
        <div ref={ref} css={{ position: "relative" }}>
            <div onClick={menu.toggle} css={{
                height: "100%",
                padding: "8px 0",
                alignSelf: "center",
                display: "flex",
                cursor: "pointer",
                "&:hover": {
                    "& div": { opacity: 1 },
                },
            }}>
                {/* Show name of user on large screens */}
                <div css={{
                    maxWidth: 240,
                    display: "flex",
                    flexDirection: "column",
                    justifyContent: "center",
                    lineHeight: 1.3,
                    paddingRight: 16,
                    opacity: 0.75,
                    [`@media (max-width: ${BREAKPOINT_MEDIUM}px)`]: {
                        display: "none",
                    },
                }}>
                    <div css={{ fontSize: 12, color: "var(--grey40)" }}>
                        {t("user.logged-in-as")}
                    </div>
                    <div css={{
                        flex: "0 1 auto",
                        textOverflow: "ellipsis",
                        whiteSpace: "nowrap",
                        overflow: "hidden",
                    }}>{user.displayName}</div>
                </div>

                {/* Show icon */}
                <ActionIcon title={t("user.settings")}>
                    <FiUserCheck css={{ "& > polyline": { stroke: "var(--happy-color-dark)" } }}/>
                </ActionIcon>
            </div>

            {/* Show menu if it is opened */}
            {menu.isOpen && <Menu close={menu.close} container={ref} />}
        </div>
    );
}