diff --git a/src/shared/ui/AppShell.module.css b/src/shared/ui/AppShell.module.css index 7ab20b1..80c4ad5 100644 --- a/src/shared/ui/AppShell.module.css +++ b/src/shared/ui/AppShell.module.css @@ -13,6 +13,83 @@ display: none; } +.navIcon { + display: inline-flex; + flex-shrink: 0; +} + +@media (prefers-reduced-motion: no-preference) { + .drawStroke { + stroke-dasharray: 1; + } + + .topSlider { + --slider-offset: -3px; + } + + .bottomSlider { + --slider-offset: 3px; + } + + .navLink:focus-visible { + .portfolioIcon { + animation: portfolio-sway 650ms ease-in-out; + } + .drawStroke { + animation: stroke-draw 650ms ease-in-out; + } + :is(.topSlider, .bottomSlider) { + animation: slider-slide 650ms ease-in-out; + } + } + + @media (hover: hover) { + .navLink:hover { + .portfolioIcon { + animation: portfolio-sway 650ms ease-in-out; + } + .drawStroke { + animation: stroke-draw 650ms ease-in-out; + } + :is(.topSlider, .bottomSlider) { + animation: slider-slide 650ms ease-in-out; + } + } + } +} + +@keyframes portfolio-sway { + 0%, + 100% { + transform: rotate(0); + } + 30% { + transform: translateY(-1px) rotate(-10deg); + } + 65% { + transform: rotate(7deg); + } +} + +@keyframes stroke-draw { + 0% { + stroke-dashoffset: 1; + } + 100% { + stroke-dashoffset: 0; + } +} + +@keyframes slider-slide { + 0%, + 100% { + transform: translateX(0); + } + 50% { + transform: translateX(var(--slider-offset)); + } +} + @media (max-width: 47.99375em) { .bottomNav { background: var(--mantine-color-white); diff --git a/src/shared/ui/AppShell.tsx b/src/shared/ui/AppShell.tsx index ca36524..69ba5f6 100644 --- a/src/shared/ui/AppShell.tsx +++ b/src/shared/ui/AppShell.tsx @@ -16,6 +16,7 @@ const AppShell: FC = (props) => { { to: "/accounts", label: t("navigation.accounts"), + iconClassName: classes.portfolioIcon, icon: ( ), @@ -23,18 +24,42 @@ const AppShell: FC = (props) => { { to: "/stocks", label: t("navigation.stocks"), - icon: , + icon: ( + <> + + + + ), }, { to: "/bonds", label: t("navigation.bonds"), - icon: , + icon: ( + <> + + + + ), }, { to: "/settings", label: t("navigation.settings"), icon: ( - + <> + + + ), }, ]; @@ -52,24 +77,29 @@ const AppShell: FC = (props) => { {items.map((item) => (