-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLeagueSurvivors.tsx
More file actions
36 lines (33 loc) · 1.1 KB
/
LeagueSurvivors.tsx
File metadata and controls
36 lines (33 loc) · 1.1 KB
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
31
32
33
34
35
36
// Copyright (c) Gridiron Survivor.
// Licensed under the MIT License.
import { cn } from '../../utils/utils';
import { ILeagueSurvivorsProps } from './LeagueSurvivors.interface';
import { JSX } from 'react';
/**
* A component that displays the number of survivors and total players in a league.
* @param {ILeagueSurvivorsProps} props - The props object for the component.
* @param {string} props.className - Additional CSS classes to apply to the component.
* @param {number} props.survivors - The number of survivors in the league.
* @param {number} props.totalPlayers - The total number of players in the league.
* @returns {JSX.Element} The rendered component.
*/
const LeagueSurvivors = ({
className,
survivors,
totalPlayers,
}: ILeagueSurvivorsProps): JSX.Element => (
<p
data-testid="LeagueSurvivors"
className={cn(`LeagueSurvivors text-sm text-foreground ${className}`)}
>
Survivors {survivors}
<span
data-testid="LeagueSurvivorsTotalPlayers"
className="text-muted-foreground"
>
{' '}
/ {totalPlayers}
</span>
</p>
);
export { LeagueSurvivors };