improved feels PropertyTable (#804)

This commit is contained in:
Michael Quigley 2025-01-06 11:51:29 -05:00
parent b419300ea2
commit 7b53ad0661
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -1,6 +1,6 @@
import React, {useEffect, useState} from "react"; import React, {useEffect, useState} from "react";
import {camelToWords, objectToRows} from "./model/util.ts"; import {camelToWords, objectToRows} from "./model/util.ts";
import {Paper, Table, TableBody, TableCell, TableHead, TableRow} from "@mui/material"; import {Paper, Table, TableBody, TableCell, TableRow} from "@mui/material";
type PropertyTableProps = { type PropertyTableProps = {
object: any; object: any;
@ -26,16 +26,10 @@ const PropertyTable = ({ object, custom }: PropertyTableProps) => {
return ( return (
<Paper> <Paper>
<Table> <Table>
<TableHead>
<TableRow>
<TableCell>Property</TableCell>
<TableCell>Value</TableCell>
</TableRow>
</TableHead>
<TableBody> <TableBody>
{data.map((row) => ( {data.map((row) => (
<TableRow key={row.id}> <TableRow key={row.id}>
<TableCell sx={{ width: 100 }}>{camelToWords(row.property)}</TableCell> <TableCell sx={{ width: 100 }}><strong>{camelToWords(row.property)}</strong></TableCell>
<TableCell sx={{ width: 1000 }}>{value(row)}</TableCell> <TableCell sx={{ width: 1000 }}>{value(row)}</TableCell>
</TableRow> </TableRow>
))} ))}