From 899f45f09bc461450542ea42ac8175ea5190d8ae Mon Sep 17 00:00:00 2001 From: BrunoQuaresma Date: Wed, 19 Mar 2025 17:59:24 +0000 Subject: [PATCH] feat: update notification badge to support 99+ --- .../NotificationsInbox/UnreadBadge.stories.tsx | 10 ++++++++-- .../notifications/NotificationsInbox/UnreadBadge.tsx | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/site/src/modules/notifications/NotificationsInbox/UnreadBadge.stories.tsx b/site/src/modules/notifications/NotificationsInbox/UnreadBadge.stories.tsx index 1b1ab7c5f3d2e..d3bb608fb7d24 100644 --- a/site/src/modules/notifications/NotificationsInbox/UnreadBadge.stories.tsx +++ b/site/src/modules/notifications/NotificationsInbox/UnreadBadge.stories.tsx @@ -9,14 +9,20 @@ const meta: Meta = { export default meta; type Story = StoryObj; -export const Default: Story = { +export const Until10: Story = { args: { count: 3, }, }; -export const MoreThanNine: Story = { +export const MoreThan10: Story = { args: { count: 12, }, }; + +export const MoreThan99: Story = { + args: { + count: 1000, + }, +}; diff --git a/site/src/modules/notifications/NotificationsInbox/UnreadBadge.tsx b/site/src/modules/notifications/NotificationsInbox/UnreadBadge.tsx index e9d463de30151..940c81974d622 100644 --- a/site/src/modules/notifications/NotificationsInbox/UnreadBadge.tsx +++ b/site/src/modules/notifications/NotificationsInbox/UnreadBadge.tsx @@ -13,13 +13,13 @@ export const UnreadBadge: FC = ({ return ( - {count > 9 ? "9+" : count} + {count > 99 ? "99+" : count} ); }; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy