Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/layouts/navbar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useState } from 'react';
import {
AppBar,
Box,
Expand Down Expand Up @@ -60,6 +61,8 @@ const NavBar = ({ isSupported }: NavBarType) => {
const { t } = useAppTranslation();
const theme = useTheme();

const [settingsAnimating, setSettingsAnimating] = useState(false);

const { isAuthenticated } = useFirebaseAuth();

const {
Expand Down Expand Up @@ -504,13 +507,28 @@ const NavBar = ({ isSupported }: NavBarType) => {
</Box>
{navBarOptions.quickSettings ? (
<IconButton
onClick={handleQuickSettings}
onClick={(e) => {
handleQuickSettings(e);
setSettingsAnimating(true);
setTimeout(() => setSettingsAnimating(false), 250);
}}
aria-label={t('tr_quickSettings')}
sx={{
marginRight: '-8px',
transition: 'background-color 50ms ease-in-out',
'&:hover': {
backgroundColor: 'var(--accent-200)',
'& svg': {
transform: settingsAnimating
? 'rotate(0deg)'
: 'rotate(60deg)',
},
},
'& svg': {
transition: 'transform 0.25s ease-out',
...(settingsAnimating && {
transform: 'rotate(0deg)',
}),
},
}}
>
Expand Down
Loading