MDK Logo
ReferenceUI KitReactUI Kit foundationComponentsWidgets

ContainerWidgetCard

Presentational summary card for a single container in the Site Overview widgets grid: a header row (title / alarms / power), then either an offline / error b…

Presentational summary card for a single container in the Site Overview widgets grid: a header row (title / alarms / power), then either an offline / error banner or the body (optional vendor content, a miners summary, and a miner-activity chart).

Fully props-driven — no data fetching, formatting, or alarm math. The owning feature/hook shapes every value (including flash and summary).

import { ContainerWidgetCard } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
titleRequiredstringContainer display name shown in the header row.
powerOptionalnumber | undefinedLatest container power draw in watts (rendered in kW by the top row).
powerUnitOptionalstring | undefinedPower unit label shown next to the reading.
alarmsOptionalPartial<Record<AlarmPropKey, Alert[]>> | undefinedPer-category alarm badges for the header row.
statsErrorMessageOptionalstring | ErrorWithTimestamp[] | null | undefinedRaw stats error surfaced as a tooltip in place of the power reading.
summaryRequiredMinersSummaryParam[]Pre-formatted miners-summary rows (label + display value incl. units).
activityOptionalContainerActivityData | undefinedMiner-state activity counts for the embedded chart.
isActivityLoadingOptionalboolean | undefinedActivity chart loading state.
isActivityErrorOptionalboolean | undefinedActivity chart error state.
activityErrorOptionalContainerActivityError | undefinedActivity chart error payload.
isOfflineOptionalboolean | undefinedRender the offline banner instead of the body.
errorMessageOptionalstring | undefinedContainer-level error message; renders an error banner instead of the body.
flashOptionalboolean | undefinedCritical-high alarm flash. Computed upstream (by the data hook) so the card stays presentational — never derive alarm state inside this component.
vendorContentOptionalReact.ReactNodeOptional vendor-specific content (supply-liquid / tanks / immersion / MicroBT boxes) rendered above the miners summary. Kept as a slot so the generic card carries no per-model branching.
onClickOptional(() => void) | undefinedInvoked when the card is clicked (navigation is the caller's concern).
classNameOptionalstring | undefined

Usage

Presentational summary card for a single container in the Site Overview widgets grid. Renders a header row (title / alarm badges / power), then either an offline / error banner or the body: an optional vendor-specific content slot, a miners summary, and a miner-activity chart.

Fully props-driven — no data fetching, formatting, or alarm math. The owning feature/hook shapes every value (including flash and the pre-formatted summary rows).

Notes

  • flash and summary are derived by the container-widgets data hook — the card never computes alarm state or formats values itself.
  • Use vendorContent to slot in per-model boxes (SupplyLiquidBox, TanksBox, MicroBTWidgetBox, BitmainImmersionSummaryBox) without adding model branching to the generic card.

Example

/** * Runnable example for ContainerWidgetCard. */import { ContainerWidgetCard } from "@tetherto/mdk-react-devkit"export const ContainerWidgetCardExample = () => (  <div className="mdk-example-row">    <ContainerWidgetCard      title="Container A"      power={412_000}      powerUnit="kW"      summary={[        { label: "Hash Rate", value: "1.24 PH/s" },        { label: "Max Temp", value: "72 °C" },        { label: "Avg Temp", value: "65 °C" },        { label: "Efficiency", value: "32.5 W/TH/s" },      ]}      activity={{ total: 210, online: 200, offline: 8, faulted: 2 }}    />    <ContainerWidgetCard title="Container B" isOffline summary={[]} />    <ContainerWidgetCard      title="Container C"      errorMessage="Worker unreachable"      summary={[]}    />  </div>)