From 173376932c02871ae55bc6bbf299186f645ee41b Mon Sep 17 00:00:00 2001 From: Katie McFaul Date: Thu, 13 Nov 2025 15:05:17 -0500 Subject: [PATCH] feat(NotificationBadge): add support for plain variant --- .../NotificationBadge/NotificationBadge.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/react-core/src/components/NotificationBadge/NotificationBadge.tsx b/packages/react-core/src/components/NotificationBadge/NotificationBadge.tsx index c703aaef1dd..368e49d77b4 100644 --- a/packages/react-core/src/components/NotificationBadge/NotificationBadge.tsx +++ b/packages/react-core/src/components/NotificationBadge/NotificationBadge.tsx @@ -8,7 +8,8 @@ import { css } from '@patternfly/react-styles'; export enum NotificationBadgeVariant { read = 'read', unread = 'unread', - attention = 'attention' + attention = 'attention', + plain = 'plain' } export interface NotificationBadgeProps extends Omit { @@ -29,7 +30,7 @@ export interface NotificationBadgeProps extends Omit { */ isExpanded?: boolean; /** Determines the variant of the notification badge. */ - variant?: NotificationBadgeVariant | 'read' | 'unread' | 'attention'; + variant?: NotificationBadgeVariant | 'read' | 'unread' | 'attention' | 'plain'; /** Flag indicating whether the notification badge animation should be triggered. Each * time this prop is true, the animation will be triggered a single time. */ @@ -55,6 +56,8 @@ export const NotificationBadge: React.FunctionComponent const hasCount = count > 0; const hasChildren = children !== undefined; const isAttention = variant === NotificationBadgeVariant.attention; + const isPlain = variant === NotificationBadgeVariant.plain; + const _buttonState = isPlain ? undefined : (variant as 'read' | 'unread' | 'attention'); const notificationIcon = isAttention ? attentionIcon : icon; let notificationContent: React.ReactNode = null; @@ -77,10 +80,10 @@ export const NotificationBadge: React.FunctionComponent return (