From f16d4fec7c6eb46010486fb200f87073e457c5d9 Mon Sep 17 00:00:00 2001 From: Jan Keromnes Date: Fri, 6 Aug 2021 06:42:49 +0000 Subject: [PATCH] [dashboard] Adjust ContextMenu background style (hover, active) --- components/dashboard/src/Menu.tsx | 2 ++ components/dashboard/src/components/ContextMenu.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/dashboard/src/Menu.tsx b/components/dashboard/src/Menu.tsx index 0a9ff3eedd090b..9228f71484c5fe 100644 --- a/components/dashboard/src/Menu.tsx +++ b/components/dashboard/src/Menu.tsx @@ -159,6 +159,7 @@ export default function Menu() { {userFullName} Personal Account , + active: !team, separator: true, link: '/', }, @@ -171,6 +172,7 @@ export default function Menu() { : '...' } , + active: team && team.id === t.id, separator: true, link: `/${t.slug}`, })).sort((a, b) => a.title.toLowerCase() > b.title.toLowerCase() ? 1 : -1), diff --git a/components/dashboard/src/components/ContextMenu.tsx b/components/dashboard/src/components/ContextMenu.tsx index 36c530e9681477..4ef2ea0fa0882e 100644 --- a/components/dashboard/src/components/ContextMenu.tsx +++ b/components/dashboard/src/components/ContextMenu.tsx @@ -84,7 +84,7 @@ function ContextMenu(props: ContextMenuProps) {
{props.menuEntries.map((e, index) => { const clickable = e.href || e.onClick || e.link; - const entry =
+ const entry =
{e.customContent || <>
{e.title}
{e.active ?
: null}}
const key = `entry-${menuId}-${index}-${e.title}`;