import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Paper, Box, Button, } from "@mui/material"; import "./TransactionsOverViewTable.scss"; interface ITableData { state: string; count: number; percentage: string; color?: string; } interface ITransactionsOverViewTableProps { data?: ITableData[]; } const defaultData: ITableData[] = [ { 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 = ({ data = defaultData, }: ITransactionsOverViewTableProps) => { console.log("data", data); return ( State Count Percentage Action {data.map((row, i) => ( {row.state} {row.count} {row.percentage} ))}
); };