gitscope
← marzneshin / v0.6.2 / dashboard/src/components/info-table/circular-progress-bar.tsx
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/components/info-table/circular-progress-bar.tsx · TypeScript
Blame Raw
 1import { CircularProgress } from "@nextui-org/progress";
 2import {
 3    TableCell,
 4    TableRow,
 5} from "@marzneshin/components";
 6import { useTranslation } from "react-i18next";
 7import type { FC } from "react";
 8
 9export const CircularProgressBarRow: FC<{
10    label: string;
11    value: number;
12    limit: number | undefined;
13}> = ({ label, value, limit }) => {
14    const { t } = useTranslation()
15    return (
16        <TableRow>
17            <TableCell>{label}</TableCell>
18            <TableCell>
19                {limit ? <CircularProgress size="sm" value={(value / limit) * 100} /> : t("unlimited")}
20            </TableCell>
21        </TableRow>
22    )
23};