All files / src/components/ui/pending-badge index.tsx

92.85% Statements 26/28
100% Branches 0/0
0% Functions 0/1
92.85% Lines 26/28

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 291x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x      
import { cva } from 'class-variance-authority';
 
import { cn } from '@/lib/utils';
 
const badgeVariants = cva(
  'flex-center whitespace-nowrap rounded-full border border-gray-300 bg-gray-100 text-gray-700',
  {
    variants: {
      variant: {
        sm: 'h-4.5 w-10.5 px-2 py-0.5 text-text-2xs-medium',
        md: 'h-6.5 w-13 px-2.5 py-1 text-text-xs-medium',
      },
    },
    defaultVariants: {
      variant: 'sm',
    },
  },
);
 
interface PendingBadgeProps {
  children: React.ReactNode;
  variant?: 'sm' | 'md';
  className?: string;
}
 
export const PendingBadge = ({ children, variant = 'sm', className }: PendingBadgeProps) => {
  return <div className={cn(badgeVariants({ variant }), className)}>{children}</div>;
};