import React from 'react'; import {Badge, BadgeProps} from './badge'; import {cn} from '@/lib/utils'; export interface NotificationBadgeProps extends BadgeProps { label?: string | number; show?: boolean; variant?: 'destructive' | 'default' | 'secondary'; } export const NotificationBadge = ({ label, className, show, variant = 'destructive', children, ...props }: NotificationBadgeProps) => { const showBadge = typeof label !== 'undefined' && (typeof show === 'undefined' || show); return (
{children} {showBadge && ( {'' + label} )}
); };