@fortawesome/free-solid-svg-icons#faArrowsAltV TypeScript Examples
The following examples show how to use
@fortawesome/free-solid-svg-icons#faArrowsAltV.
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: WebRtcVideoOverlayMenu.tsx From sync-party with GNU General Public License v3.0 | 5 votes |
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>
);
}