import React from 'react'; import badges from '../configs/badges'; export interface BadgeProps { direction?: 'left' | 'right'; variant: keyof typeof badges; iconOnly?: boolean; icon?: string; title?: string; discountPercentage?: string; theme?: string; top?: `top-${string}`; right?: `right-${string}`; width?: string; } const Badge = ({ variant = 'custom', discountPercentage, icon, title, iconOnly, theme = '', top = 'top-1', right = 'right-1', width = 'w-full', direction = 'left', }: BadgeProps) => { return (
{iconOnly ? null : (    {variant === 'discount' && discountPercentage ? `${discountPercentage}` : ''} {variant === 'custom' && title ? title : badges[variant].title} )}
); }; export default Badge;