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>[] = [
|
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: "name", header: "Název", render: (v) => v.name },
|
||||||
{
|
{
|
||||||
key: "brand",
|
key: "brand",
|
||||||
@@ -250,6 +250,7 @@ export default function Vehicles() {
|
|||||||
header: "Aktuální km",
|
header: "Aktuální km",
|
||||||
align: "right",
|
align: "right",
|
||||||
mono: true,
|
mono: true,
|
||||||
|
bold: true,
|
||||||
render: (v) => `${formatKm(v.current_km)} km`,
|
render: (v) => `${formatKm(v.current_km)} km`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ export interface DataColumn<T> {
|
|||||||
align?: "left" | "right";
|
align?: "left" | "right";
|
||||||
/** Render the cell with the DM Mono numeric face. */
|
/** Render the cell with the DM Mono numeric face. */
|
||||||
mono?: boolean;
|
mono?: boolean;
|
||||||
|
/** Emphasize the cell (font-weight 500). */
|
||||||
|
bold?: boolean;
|
||||||
render: (row: T) => ReactNode;
|
render: (row: T) => ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,7 +69,10 @@ export default function DataTable<T>({
|
|||||||
align={c.align}
|
align={c.align}
|
||||||
sx={{
|
sx={{
|
||||||
fontSize: ".8rem",
|
fontSize: ".8rem",
|
||||||
...(c.mono ? { fontFamily: "'DM Mono', monospace" } : {}),
|
...(c.bold ? { fontWeight: 500 } : {}),
|
||||||
|
...(c.mono
|
||||||
|
? { fontFamily: "'DM Mono', Menlo, monospace" }
|
||||||
|
: {}),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{c.render(row)}
|
{c.render(row)}
|
||||||
|
|||||||
Reference in New Issue
Block a user