style(mui): DataTable bold-cell option; restore SPZ/Aktualni-km emphasis + mono Menlo fallback
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -230,7 +230,7 @@ export default function Vehicles() {
|
||||
}
|
||||
|
||||
const columns: DataColumn<Vehicle>[] = [
|
||||
{ key: "spz", header: "SPZ", mono: true, render: (v) => v.spz },
|
||||
{ key: "spz", header: "SPZ", mono: true, bold: true, render: (v) => v.spz },
|
||||
{ key: "name", header: "Název", render: (v) => v.name },
|
||||
{
|
||||
key: "brand",
|
||||
@@ -250,6 +250,7 @@ export default function Vehicles() {
|
||||
header: "Aktuální km",
|
||||
align: "right",
|
||||
mono: true,
|
||||
bold: true,
|
||||
render: (v) => `${formatKm(v.current_km)} km`,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -12,6 +12,8 @@ export interface DataColumn<T> {
|
||||
align?: "left" | "right";
|
||||
/** Render the cell with the DM Mono numeric face. */
|
||||
mono?: boolean;
|
||||
/** Emphasize the cell (font-weight 500). */
|
||||
bold?: boolean;
|
||||
render: (row: T) => ReactNode;
|
||||
}
|
||||
|
||||
@@ -67,7 +69,10 @@ export default function DataTable<T>({
|
||||
align={c.align}
|
||||
sx={{
|
||||
fontSize: ".8rem",
|
||||
...(c.mono ? { fontFamily: "'DM Mono', monospace" } : {}),
|
||||
...(c.bold ? { fontWeight: 500 } : {}),
|
||||
...(c.mono
|
||||
? { fontFamily: "'DM Mono', Menlo, monospace" }
|
||||
: {}),
|
||||
}}
|
||||
>
|
||||
{c.render(row)}
|
||||
|
||||
Reference in New Issue
Block a user