react-icons/fa#FaAngleDoubleRight TypeScript Examples
The following examples show how to use
react-icons/fa#FaAngleDoubleRight.
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: Page.tsx From crosshare with GNU Affero General Public License v3.0 | 6 votes |
TinyNavButton = ({ isLeft, dispatch }: TinyNavButtonProps) => {
return (
<button
css={{
background: 'none',
border: 'none',
padding: 'none',
width: '2em',
textAlign: 'center',
flexShrink: 0,
color: 'var(--text)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
[SMALL_AND_UP]: {
display: 'none',
},
}}
aria-label={isLeft ? 'Previous Entry' : 'Next Entry'}
onClick={(e) => {
e.preventDefault();
dispatch({
type: 'KEYPRESS',
key: { k: isLeft ? KeyK.PrevEntry : KeyK.NextEntry },
});
}}
>
{isLeft ? (
<FaAngleDoubleLeft css={{ position: 'absolute' }} />
) : (
<FaAngleDoubleRight css={{ position: 'absolute' }} />
)}
</button>
);
}
Example #2
Source File: Keyboard.tsx From crosshare with GNU Affero General Public License v3.0 | 4 votes |
Keyboard = memo(function Keyboard({
muted,
keyboardHandler,
...props
}: KeyboardProps) {
const [audioContext, initAudioContext] = useContext(CrosshareAudioContext);
const playKeystrokeSound = useRef<(() => void) | null>(null);
useEffect(() => {
if (!audioContext) {
return initAudioContext();
}
if (!playKeystrokeSound.current && !muted && audioContext) {
fetch('/keypress.mp3')
.then((response) => response.arrayBuffer())
.then((buffer) => {
const gainNode = audioContext.createGain();
gainNode.gain.value = 0.7;
gainNode.connect(audioContext.destination);
audioContext.decodeAudioData(buffer, (audioBuffer) => {
playKeystrokeSound.current = () => {
const source = audioContext.createBufferSource();
source.buffer = audioBuffer;
source.connect(gainNode);
source.start();
};
});
});
}
}, [muted, audioContext, initAudioContext]);
const keypress = useCallback(
(key: string) => {
if (!muted && playKeystrokeSound.current) {
playKeystrokeSound.current();
}
if (keyboardHandler) {
keyboardHandler(key);
}
},
[muted, keyboardHandler]
);
if (props.showExtraKeyLayout) {
return (
<KeyRows toggleKeyboard={props.toggleKeyboard}>
<KeyRow>
<Key keyStroke="1" onKeypress={keypress} />
<Key keyStroke="2" onKeypress={keypress} />
<Key keyStroke="3" onKeypress={keypress} />
<Key keyStroke="4" onKeypress={keypress} />
<Key keyStroke="5" onKeypress={keypress} />
<Key keyStroke="Ñ" onKeypress={keypress} />
</KeyRow>
<KeyRow>
<Key keyStroke="6" onKeypress={keypress} />
<Key keyStroke="7" onKeypress={keypress} />
<Key keyStroke="8" onKeypress={keypress} />
<Key keyStroke="9" onKeypress={keypress} />
<Key keyStroke="0" onKeypress={keypress} />
<Key keyStroke="&" onKeypress={keypress} />
</KeyRow>
<KeyRow>
<Key keyStroke="{abc}" display="ABC" onKeypress={keypress} />
<Key keyStroke="{rebus}" display="Rebus" onKeypress={keypress} />
<Key
keyStroke="{bksp}"
display={<FaBackspace />}
onKeypress={keypress}
/>
</KeyRow>
</KeyRows>
);
}
return (
<KeyRows toggleKeyboard={props.toggleKeyboard}>
<KeyRow>
<Key keyStroke="Q" onKeypress={keypress} />
<Key keyStroke="W" onKeypress={keypress} />
<Key keyStroke="E" onKeypress={keypress} />
<Key keyStroke="R" onKeypress={keypress} />
<Key keyStroke="T" onKeypress={keypress} />
<Key keyStroke="Y" onKeypress={keypress} />
<Key keyStroke="U" onKeypress={keypress} />
<Key keyStroke="I" onKeypress={keypress} />
<Key keyStroke="O" onKeypress={keypress} />
<Key keyStroke="P" onKeypress={keypress} />
<Key
onlyOnTablet
keyStroke="{bksp}"
display={<FaBackspace />}
onKeypress={keypress}
/>
</KeyRow>
<KeyRow>
<Key
onlyOnTablet={props.includeBlockKey}
keyStroke="{prev}"
smallSize={true}
display={<FaAngleLeft />}
onKeypress={keypress}
/>
<Key keyStroke="A" onKeypress={keypress} />
<Key keyStroke="S" onKeypress={keypress} />
<Key keyStroke="D" onKeypress={keypress} />
<Key keyStroke="F" onKeypress={keypress} />
<Key keyStroke="G" onKeypress={keypress} />
<Key keyStroke="H" onKeypress={keypress} />
<Key keyStroke="J" onKeypress={keypress} />
<Key keyStroke="K" onKeypress={keypress} />
<Key keyStroke="L" onKeypress={keypress} />
{props.includeBlockKey ? (
<Key
css={{ border: '1px solid var(--cell-wall)' }}
keyStroke="{block}"
backgroundColor="repeating-linear-gradient(-45deg,var(--cell-wall),var(--cell-wall) 10px,var(--primary) 10px,var(--primary) 20px);"
display=" "
onKeypress={keypress}
/>
) : (
''
)}
<Key
onlyOnTablet
keyStroke="{dir}"
smallSize={props.includeBlockKey}
display={<AiOutlineEnter />}
onKeypress={keypress}
/>
<Key
onlyOnTablet={props.includeBlockKey}
keyStroke="{next}"
smallSize={true}
display={<FaAngleRight />}
onKeypress={keypress}
/>
</KeyRow>
<KeyRow>
<Key
onlyOnTablet
keyStroke="{prevEntry}"
display={<FaAngleDoubleLeft />}
onKeypress={keypress}
/>
<Key
notOnTablet
keyStroke="{num}"
smallFont={true}
largeSize={true}
display="More"
onKeypress={keypress}
/>
<Key keyStroke="Z" onKeypress={keypress} />
<Key keyStroke="X" onKeypress={keypress} />
<Key keyStroke="C" onKeypress={keypress} />
<Key keyStroke="V" onKeypress={keypress} />
<Key keyStroke="B" onKeypress={keypress} />
<Key keyStroke="N" onKeypress={keypress} />
<Key keyStroke="M" onKeypress={keypress} />
<Key
onlyOnTablet
keyStroke="{num}"
display="More"
onKeypress={keypress}
/>
<Key
onlyOnTablet
keyStroke="{rebus}"
display="Rebus"
onKeypress={keypress}
/>
<Key
onlyOnTablet
keyStroke="{nextEntry}"
display={<FaAngleDoubleRight />}
onKeypress={keypress}
/>
<Key
notOnTablet
keyStroke="{bksp}"
largeSize={true}
display={<FaBackspace />}
onKeypress={keypress}
/>
</KeyRow>
</KeyRows>
);
})