mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-06 07:53:54 +00:00
refactor: use ontime button in view
This commit is contained in:
committed by
Carlos Valente
parent
97e3e8f435
commit
7c93f6232d
@@ -3,6 +3,7 @@ import { IoSettingsOutline } from 'react-icons/io5';
|
||||
|
||||
import { useFadeOutOnInactivity } from '../../hooks/useFadeOutOnInactivity';
|
||||
import { cx } from '../../utils/styleUtils';
|
||||
import IconButton from '../buttons/IconButton';
|
||||
|
||||
import style from './NavigationMenu.module.scss';
|
||||
|
||||
@@ -17,22 +18,24 @@ export default function FloatingNavigation(props: FloatingNavigationProps) {
|
||||
|
||||
return (
|
||||
<div className={cx([style.fadeable, style.buttonContainer, !isButtonShown && style.hidden])}>
|
||||
<button
|
||||
<IconButton
|
||||
variant='subtle-white'
|
||||
className={style.navButton}
|
||||
onClick={toggleMenu}
|
||||
aria-label='toggle menu'
|
||||
className={style.navButton}
|
||||
data-testid='navigation__toggle-menu'
|
||||
>
|
||||
<IoApps />
|
||||
</button>
|
||||
<button
|
||||
className={style.button}
|
||||
</IconButton>
|
||||
<IconButton
|
||||
variant='subtle-white'
|
||||
className={style.navButton}
|
||||
onClick={toggleSettings}
|
||||
aria-label='toggle settings'
|
||||
data-testid='navigation__toggle-settings'
|
||||
>
|
||||
<IoSettingsOutline />
|
||||
</button>
|
||||
</IconButton>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
$menu-hover-bg: $gray-1350;
|
||||
$menu-focus-bg: $gray-1300;
|
||||
|
||||
$icon-color: $ui-white;
|
||||
$button-bg: $gray-1050;
|
||||
$button-size: 3rem;
|
||||
|
||||
.fadeable {
|
||||
@@ -41,20 +39,10 @@ $button-size: 3rem;
|
||||
z-index: 12;
|
||||
}
|
||||
|
||||
.button {
|
||||
font-size: 1.5rem;
|
||||
color: $icon-color;
|
||||
background-color: $button-bg;
|
||||
width: $button-size;
|
||||
height: $button-size;
|
||||
display: grid;
|
||||
place-content: center;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.navButton {
|
||||
@extend .button;
|
||||
z-index: 3;
|
||||
font-size: 1.5rem;
|
||||
height: $button-size;
|
||||
width: $button-size;;
|
||||
}
|
||||
|
||||
.link {
|
||||
|
||||
Reference in New Issue
Block a user