All files / src/components/shared/card/card-participation-row index.tsx

100% Statements 30/30
100% Branches 1/1
100% Functions 1/1
100% Lines 30/30

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 29 30 311x 1x 1x 1x 1x 1x 1x 1x 1x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x  
import { Icon } from '../../../icon';
 
type CardParticipationRowProps = {
  participantCount: number;
  maxParticipants: number;
  progress: number;
};
 
export const CardParticipationRow = ({
  participantCount,
  maxParticipants,
  progress,
}: CardParticipationRowProps) => {
  return (
    <div className='mt-3 flex h-[18px] items-center'>
      <div className='flex min-w-0 flex-1 items-center gap-1.5'>
        <Icon id='users-1' width={12} className='shrink-0 text-gray-600' height={12} />
        <div className='h-[6px] w-[200px] overflow-hidden rounded-full bg-gray-200 sm:w-[210px]'>
          <div
            className='bg-mint-400 h-full rounded-full transition-all duration-500 ease-out will-change-[width]'
            style={{ width: `${progress}%` }}
          />
        </div>
        <span className='text-text-2xs-medium text-mint-500 shrink-0 whitespace-nowrap'>
          {participantCount}/{maxParticipants}
        </span>
      </div>
    </div>
  );
};