From 044717b44331c12b7fdaa79fd16cc1e4d6bab7bd Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 29 Nov 2022 16:31:59 +0530 Subject: [PATCH] feat: show count in badge for filter, sort and fields button Signed-off-by: Pranav C --- packages/nc-gui/assets/style.scss | 5 +++++ .../components/smartsheet/toolbar/ColumnFilterMenu.vue | 4 +++- .../nc-gui/components/smartsheet/toolbar/FieldsMenu.vue | 7 +++++-- .../nc-gui/components/smartsheet/toolbar/SortListMenu.vue | 3 +++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/assets/style.scss b/packages/nc-gui/assets/style.scss index 1a65ac5e13..87c00840fe 100644 --- a/packages/nc-gui/assets/style.scss +++ b/packages/nc-gui/assets/style.scss @@ -86,6 +86,11 @@ a { @apply relative after:(absolute top-[-2px] right-[-2px] w-[8px] h-[8px] rounded-full bg-primary content-[''] !z-20); } +// badge with count +.nc-count-badge { + @apply absolute flex items-center top-[-6px] right-[-6px] px-1 min-w-[14px] h-[14px] rounded-full bg-primary bg-opacity-100 text-white !text-[9px] !z-21; +} + // for highlighting toolbar menu item .nc-active-btn > .ant-btn { @apply bg-primary bg-opacity-20 hover:(bg-primary bg-opacity-20); diff --git a/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue b/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue index 18c0d42120..293037748e 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/ColumnFilterMenu.vue @@ -71,13 +71,15 @@ useMenuCloseOnEsc(open)