Files
CT/src/View/Components/infoTile.tsx
T

25 lines
596 B
TypeScript
Raw Normal View History

import * as React from "bloatless-react";
2026-04-09 15:45:19 +00:00
export function InfoTile(
icon: string,
label: string,
content: string | React.State<string>,
) {
let contentState: React.State<string>;
if (typeof content == "string") {
contentState = new React.State(content);
} else {
contentState = content;
}
2026-04-09 15:45:19 +00:00
return (
<div class="tile">
<span class="icon">{icon}</span>
<div>
<span>{label}</span>
<b class="break-word" subscribe:innerText={contentState}></b>
</div>
</div>
2026-04-09 15:45:19 +00:00
);
}