Petropoulos Evangelos ae967a7e2d fix comments
2025-07-02 00:03:42 +03:00

62 lines
1.8 KiB
TypeScript

import {
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TableRow,
Paper,
Box,
Button,
} from "@mui/material";
import "./TransactionsOverViewTable.scss";
const data1 = [
{ state: "Success", count: 120, percentage: "60%", color: "green" },
{ state: "Pending", count: 50, percentage: "25%", color: "orange" },
{ state: "Failed", count: 20, percentage: "10%", color: "red" },
{ state: "Other", count: 10, percentage: "5%", color: "gray" },
];
export const TransactionsOverViewTable = () => {
return (
<TableContainer className="transactions-overview-table" component={Paper}>
<Table>
<TableHead>
<TableRow>
<TableCell align="center">State</TableCell>
<TableCell align="center">Count</TableCell>
<TableCell align="center">Percentage</TableCell>
<TableCell align="center">Action</TableCell>
</TableRow>
</TableHead>
<TableBody>
{data1.map((row, i) => (
<TableRow key={row.state + i}>
<TableCell align="center">
<Box className="transactions-overview-table__state-wrapper">
<Box
className="transactions-overview-table__state"
sx={{
bgcolor: row.color,
}}
/>
{row.state}
</Box>
</TableCell>
<TableCell align="center">{row.count}</TableCell>
<TableCell align="center">{row.percentage}</TableCell>
<TableCell align="center">
<Button variant="outlined" size="small">
View
</Button>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
);
};