MDK Logo
UI Kitreact-devkitComponentsFoundationWidgets

WidgetTopRow

Compact header row used at the top of container / miner widgets — shows the title, per-category alarm badges, and the current power reading (or an error tool…

Compact header row used at the top of container / miner widgets — shows the title, per-category alarm badges, and the current power reading (or an error tooltip).

import { WidgetTopRow } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
titleRequiredstring
powerOptionalnumber | undefined
unitOptionalstring | undefined
statsErrorMessageOptionalstring | ErrorWithTimestamp[] | null | undefined
alarmsOptionalPartial<Record<AlarmPropKey, Alert[]>> | undefined
classNameOptionalstring | undefined

Usage

Compact header row used at the top of container / miner widgets — title, per-category alarm badges, and the current power reading (or an error tooltip).

Notes

  • Uses useTimezoneFormatter from @tetherto/mdk-react-adapter; wrap in <MdkProvider>.

Example

/** * Runnable example for WidgetTopRow. */import { WidgetTopRow } from '@tetherto/mdk-react-devkit'export const WidgetTopRowExample = () => {  return (    <WidgetTopRow      title="Container 03"      power={31_500}      unit="kW"      alarms={{        liquidAlarms: [          {            severity: 'critical',            name: 'inlet_overheating',            description: 'Inlet > 78°C',            createdAt: Date.now() - 5 * 60 * 1000,          },        ],      }}    />  )}