@fortawesome/free-solid-svg-icons#faUserAlt TypeScript Examples

The following examples show how to use @fortawesome/free-solid-svg-icons#faUserAlt. 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: BoardList.tsx    From knboard with MIT License 6 votes vote down vote up
Card = ({ cardCss, to, isOwner, children }: CardProps) => {
  const [hover, setHover] = React.useState(false);

  return (
    <Grid
      item
      xs={6}
      sm={4}
      key="new-board"
      css={css`
        position: relative;
        ${hover && animationStyles}
      `}
    >
      {isOwner && (
        <Tooltip title="Owner of this board" placement="top" arrow>
          <OwnerBadge>
            <FontAwesomeIcon icon={faUserAlt} />
          </OwnerBadge>
        </Tooltip>
      )}
      <Link
        css={cardCss}
        to={to}
        onMouseEnter={() => setHover(true)}
        onMouseLeave={() => setHover(false)}
      >
        {hover && <Fade data-testid="fade" />}
        {children}
      </Link>
    </Grid>
  );
}
Example #2
Source File: SettingsView.tsx    From mysterium-vpn-desktop with MIT License 5 votes vote down vote up
SettingsView: React.FC = observer(function SettingsView() {
    const navigate = useNavigate()
    const location = useLocation()
    const isFilterTabActive = location.pathname == locations.settingsFilters
    const isConnectionTabActive = location.pathname == locations.settingsConnection
    const isMysteriumIdTabActive = location.pathname == locations.settingsMysteriumId
    return (
        <ViewContainer>
            <ViewNavBar />
            <ViewSplit>
                <ViewSidebar>
                    <SideTop>
                        <IconSettings color={brandLight} />
                        <Title>Settings</Title>
                    </SideTop>
                    <SideBot>
                        <NavButton active={isFilterTabActive} onClick={() => navigate(locations.settingsFilters)}>
                            <FontAwesomeIcon icon={faSlidersH} />
                            Default filters
                        </NavButton>
                        <NavButton
                            active={isConnectionTabActive}
                            onClick={() => navigate(locations.settingsConnection)}
                        >
                            <FontAwesomeIcon icon={faGlobe} />
                            Connection
                        </NavButton>
                        <NavButton
                            active={isMysteriumIdTabActive}
                            onClick={() => navigate(locations.settingsMysteriumId)}
                        >
                            <FontAwesomeIcon icon={faUserAlt} />
                            Mysterium ID
                        </NavButton>
                        <Version />
                    </SideBot>
                </ViewSidebar>
                <Content>
                    <Outlet />
                </Content>
            </ViewSplit>
        </ViewContainer>
    )
})
Example #3
Source File: WebRtcVideoOverlayMenu.tsx    From sync-party with GNU General Public License v3.0 5 votes vote down vote up
export default function WebRtcVideoOverlayMenu({
    isActive,
    displayVertically,
    setDisplayVertically,
    displayOwnVideo,
    setDisplayOwnVideo,
    otherVideosAmount
}: Props): ReactElement {
    const { t } = useTranslation();
    const dispatch = useDispatch();
    const webRtcState = useSelector(
        (state: RootAppState) => state.globalState.webRtc
    );
    const uiVisible = useSelector(
        (state: RootAppState) => state.globalState.uiVisible
    );

    return (
        <div
            className={
                'absolute top-0 left-0 flex flex-row rounded p-1 bg-black opacity-75' +
                (uiVisible && (isActive || webRtcState.isFullscreen)
                    ? ''
                    : ' hidden') +
                (webRtcState.isFullscreen ? ' ml-1 mt-8' : ' m-1')
            }
            style={{ zIndex: 1000 }}
        >
            <BarButton
                size="small"
                isActive={displayOwnVideo}
                clickHandler={(): void => setDisplayOwnVideo(!displayOwnVideo)}
                icon={displayOwnVideo ? faUserAlt : faUserAltSlash}
                titleText={t(
                    displayOwnVideo
                        ? 'webRtc.toggleUserVideoOff'
                        : 'webRtc.toggleUserVideoOn'
                )}
                margins="mt-0 mr-2"
            />
            <BarButton
                size="small"
                isActive={webRtcState.isFullscreen || false}
                clickHandler={(): void => {
                    dispatch(
                        setGlobalState({
                            webRtc: {
                                ...webRtcState,
                                isFullscreen: !webRtcState.isFullscreen
                            }
                        })
                    );
                }}
                icon={webRtcState.isFullscreen ? faCompress : faExpand}
                titleText={t('webRtc.fullscreen')}
                margins={'mt-0' + (otherVideosAmount > 1 ? ' mr-2' : '')}
            />
            {otherVideosAmount > 1 && (
                <BarButton
                    size="small"
                    isActive={displayVertically}
                    clickHandler={(): void =>
                        setDisplayVertically(!displayVertically)
                    }
                    icon={faArrowsAltV}
                    titleText={t(
                        displayVertically
                            ? 'webRtc.displayHorizontally'
                            : 'webRtc.displayVertically'
                    )}
                    margins={'mt-0'}
                />
            )}
        </div>
    );
}