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";| Prop | Status | Type | Default | Description |
|---|---|---|---|---|
title | Required | string | — | — |
power | Optional | number | undefined | — | — |
unit | Optional | string | undefined | — | — |
statsErrorMessage | Optional | string | ErrorWithTimestamp[] | null | undefined | — | — |
alarms | Optional | Partial<Record<AlarmPropKey, Alert[]>> | undefined | — | — |
className | Optional | string | 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
useTimezoneFormatterfrom@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, }, ], }} /> )}