From 8d0130e71cdd7ff7ad362f76e52d116c2f3f257c Mon Sep 17 00:00:00 2001 From: EliteAsian <29520859+EliteAsian123@users.noreply.github.com> Date: Thu, 24 Aug 2023 13:14:36 -0400 Subject: [PATCH] Added selection background on "Home" and "Downloads" button --- src/components/Sidebar/Sidebar.module.css | 16 ++++++++++++++++ src/components/Sidebar/index.tsx | 14 +++++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/components/Sidebar/Sidebar.module.css b/src/components/Sidebar/Sidebar.module.css index 82294b0..6a22dd2 100644 --- a/src/components/Sidebar/Sidebar.module.css +++ b/src/components/Sidebar/Sidebar.module.css @@ -38,11 +38,27 @@ color: var(--primary); } +.menus { + display: flex; + flex-direction: column; + gap: 5px; +} + /* Menu Button */ .button { display: flex; gap: 10px; + + background: rgba(255, 255, 255, 0); + border-radius: 13px; + + transition: background 0.1s; +} + +[aria-current="page"] > .button, +.button:hover { + background: rgba(255, 255, 255, 0.025); } .button .icon { diff --git a/src/components/Sidebar/index.tsx b/src/components/Sidebar/index.tsx index 0dcdbfb..254a6b0 100644 --- a/src/components/Sidebar/index.tsx +++ b/src/components/Sidebar/index.tsx @@ -1,7 +1,7 @@ import styles from "./Sidebar.module.css"; import { DiscordIcon, TwitterIcon, GithubIcon, HomeIcon, QueueIcon } from "@app/assets/Icons"; import SidebarMenuButton from "./SidebarMenuButton"; -import { Link } from "react-router-dom"; +import { NavLink } from "react-router-dom"; import VersionsList from "./Versions/List"; import { useEffect, useState } from "react"; import { getVersion } from "@tauri-apps/api/app"; @@ -31,13 +31,17 @@ const Sidebar: React.FC = () => { return
- }>Home - {/* }>Settings */} - + + }> + Home + + + {/* }>Settings */} + }> Downloads {getDownloadCount() <= 0 ? "" : `(${getDownloadCount()})`} - +