← marzneshin
/
v0.6.4
/
dashboard/src/common/components/info-table/circular-progress-bar.tsx
https://dev.kronoz.win/r/marzneshin.git
1import { CircularProgress } from "@nextui-org/progress";
2import {
3 TableCell,
4 TableRow,
5} from "@marzneshin/common/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};