mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-19 06:04:05 +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 { useFadeOutOnInactivity } from '../../hooks/useFadeOutOnInactivity';
|
||||||
import { cx } from '../../utils/styleUtils';
|
import { cx } from '../../utils/styleUtils';
|
||||||
|
import IconButton from '../buttons/IconButton';
|
||||||
|
|
||||||
import style from './NavigationMenu.module.scss';
|
import style from './NavigationMenu.module.scss';
|
||||||
|
|
||||||
@@ -17,22 +18,24 @@ export default function FloatingNavigation(props: FloatingNavigationProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cx([style.fadeable, style.buttonContainer, !isButtonShown && style.hidden])}>
|
<div className={cx([style.fadeable, style.buttonContainer, !isButtonShown && style.hidden])}>
|
||||||
<button
|
<IconButton
|
||||||
|
variant='subtle-white'
|
||||||
|
className={style.navButton}
|
||||||
onClick={toggleMenu}
|
onClick={toggleMenu}
|
||||||
aria-label='toggle menu'
|
aria-label='toggle menu'
|
||||||
className={style.navButton}
|
|
||||||
data-testid='navigation__toggle-menu'
|
data-testid='navigation__toggle-menu'
|
||||||
>
|
>
|
||||||
<IoApps />
|
<IoApps />
|
||||||
</button>
|
</IconButton>
|
||||||
<button
|
<IconButton
|
||||||
className={style.button}
|
variant='subtle-white'
|
||||||
|
className={style.navButton}
|
||||||
onClick={toggleSettings}
|
onClick={toggleSettings}
|
||||||
aria-label='toggle settings'
|
aria-label='toggle settings'
|
||||||
data-testid='navigation__toggle-settings'
|
data-testid='navigation__toggle-settings'
|
||||||
>
|
>
|
||||||
<IoSettingsOutline />
|
<IoSettingsOutline />
|
||||||
</button>
|
</IconButton>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
$menu-hover-bg: $gray-1350;
|
$menu-hover-bg: $gray-1350;
|
||||||
$menu-focus-bg: $gray-1300;
|
$menu-focus-bg: $gray-1300;
|
||||||
|
|
||||||
$icon-color: $ui-white;
|
|
||||||
$button-bg: $gray-1050;
|
|
||||||
$button-size: 3rem;
|
$button-size: 3rem;
|
||||||
|
|
||||||
.fadeable {
|
.fadeable {
|
||||||
@@ -41,20 +39,10 @@ $button-size: 3rem;
|
|||||||
z-index: 12;
|
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 {
|
.navButton {
|
||||||
@extend .button;
|
font-size: 1.5rem;
|
||||||
z-index: 3;
|
height: $button-size;
|
||||||
|
width: $button-size;;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link {
|
.link {
|
||||||
|
|||||||
Reference in New Issue
Block a user