Get state of relay on device page
This commit is contained in:
11
central_frontend/src/widgets/BoolText.tsx
Normal file
11
central_frontend/src/widgets/BoolText.tsx
Normal file
@ -0,0 +1,11 @@
|
||||
export function BoolText(p: {
|
||||
val: boolean;
|
||||
positive: string;
|
||||
negative: string;
|
||||
}): React.ReactElement {
|
||||
return p.val ? (
|
||||
<span style={{ color: "green" }}>{p.positive}</span>
|
||||
) : (
|
||||
<span style={{ color: "red" }}>{p.negative}</span>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user