import * as React from 'react'; import { cn } from '@/lib/utils'; import { Crown } from 'lucide-react'; interface ProBadgeProps extends React.HTMLAttributes { /** Size of the badge */ size?: 'sm' | 'md' | 'lg'; /** Show crown icon */ showIcon?: boolean; /** Badge text (default: "PRO") */ text?: string; } /** * ProBadge - Shows "PRO" badge for Pro-only features * * Usage: * - Add next to Pro-only field types in picker * - Add next to Pro-only menu items * - Add next to Pro-only settings * * When Pro is active, this component should NOT be rendered. * Use with ProFeatureGate or conditional rendering based on isPro. */ const ProBadge = React.forwardRef( ({ className, size = 'sm', showIcon = false, text = 'PRO', ...props }, ref) => { const sizeClasses = { sm: 'rdcfe-px-1.5 rdcfe-py-0.5 rdcfe-text-[10px]', md: 'rdcfe-px-2 rdcfe-py-0.5 rdcfe-text-xs', lg: 'rdcfe-px-2.5 rdcfe-py-1 rdcfe-text-sm', }; const iconSizes = { sm: 'rdcfe-h-2.5 rdcfe-w-2.5', md: 'rdcfe-h-3 rdcfe-w-3', lg: 'rdcfe-h-3.5 rdcfe-w-3.5', }; return ( {showIcon && } {text} ); } ); ProBadge.displayName = 'ProBadge'; /** * ProTag - Smaller inline tag for settings/options */ const ProTag = React.forwardRef>( ({ className, ...props }, ref) => ( ) ); ProTag.displayName = 'ProTag'; export { ProBadge, ProTag };