mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-15 20:33:47 +00:00
da7c0d4ff2
* chore: remove old comment * chore: smal lclean up of a e2e test * chore: bump to beta.6 * chore: cleanup imports * fix integration values com in ms * allow linkStart and timeStrategy from API * remove local mac dist
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import { IoApps, IoSettingsOutline } from 'react-icons/io5';
|
|
|
|
import { useFadeOutOnInactivity } from '../../../hooks/useFadeOutOnInactivity';
|
|
import { cx } from '../../../utils/styleUtils';
|
|
import IconButton from '../../buttons/IconButton';
|
|
|
|
import style from './FloatingNavigation.module.scss';
|
|
|
|
interface FloatingNavigationProps {
|
|
toggleMenu?: () => void;
|
|
toggleSettings?: () => void;
|
|
}
|
|
|
|
export default function FloatingNavigation({ toggleMenu, toggleSettings }: FloatingNavigationProps) {
|
|
const isButtonShown = useFadeOutOnInactivity(true);
|
|
|
|
return (
|
|
<div
|
|
id='fadeable-navigation'
|
|
className={cx([style.fadeable, style.buttonContainer, !isButtonShown && style.hidden])}
|
|
>
|
|
{toggleMenu && (
|
|
<IconButton
|
|
variant='subtle-white'
|
|
size='xlarge'
|
|
onClick={toggleMenu}
|
|
aria-label='toggle menu'
|
|
data-testid='navigation__toggle-menu'
|
|
>
|
|
<IoApps />
|
|
</IconButton>
|
|
)}
|
|
{toggleSettings && (
|
|
<IconButton
|
|
variant='subtle-white'
|
|
size='xlarge'
|
|
onClick={toggleSettings}
|
|
aria-label='toggle settings'
|
|
data-testid='navigation__toggle-settings'
|
|
>
|
|
<IoSettingsOutline />
|
|
</IconButton>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|