Start to build relay dialog

This commit is contained in:
2024-07-29 22:11:13 +02:00
parent 73163e6e69
commit 8a65687970
11 changed files with 518 additions and 48 deletions

View File

@@ -62,6 +62,7 @@ export function GeneralDeviceInfo(p: {
<DeviceInfoProperty
label="Enabled"
value={p.device.enabled ? "YES" : "NO"}
color={p.device.enabled ? "green" : "red"}
/>
<DeviceInfoProperty
label="Maximum number of relays"
@@ -82,11 +83,12 @@ function DeviceInfoProperty(p: {
icon?: React.ReactElement;
label: string;
value: string;
color?: string;
}): React.ReactElement {
return (
<TableRow hover sx={{ "&:last-child td, &:last-child th": { border: 0 } }}>
<TableCell>{p.label}</TableCell>
<TableCell>{p.value}</TableCell>
<TableCell style={{ color: p.color }}>{p.value}</TableCell>
</TableRow>
);
}