MDK Logo

Card

Card containers and card-based layouts

Card components for grouping and presenting content.

Prerequisites

  • Complete the installation

  • Add the dependency to your app's package.json
{
  "dependencies": {
    "@tetherto/mdk-react-devkit": "*",
    "@tetherto/mdk-react-adapter": "*",
    "@tetherto/mdk-ui-foundation": "*"
  }
}

Run npm install from the mdk/ui workspace root after your app is under apps/ so npm links workspace packages.

  • Import styles: import '@tetherto/mdk-react-devkit/styles.css'

Components

@tetherto/mdk-react-devkit

Import the public APIs on this page from @tetherto/mdk-react-devkit.

ActiveIncidentsCard

Summary card displaying a list of active incidents/alerts with severity indicators, loading skeleton, and empty state. Rows are virtualized via @tanstack/react-virtual so the card stays responsive with thousands of incidents.

agent-ready

Props

PropTypeRequiredDefaultDescription
labelstring--
isLoadingboolean--
classNamestring--
skeletonRowsnumber--
emptyMessagestring--
itemsTIncidentRowProps[]--
onItemClick(id: string) => void--

CabinetDetailCard

Read-only LV cabinet detail: powermeter readings, the root plus per-position temperature readings (severity-coloured, with an offline marker), and the active-warnings timeline. Presentational — shape the rows with useCabinetDetail.

advanced

Props

PropTypeRequiredDefaultDescription
titlestring✓-Cabinet display title (LV Cabinet 1 / transformer title).
powerMetersCabinetReadingRow[]✓-Non-root powermeter reading rows.
rootTempSensorCabinetReadingRow | undefined-The cabinet-root temperature reading, when present.
tempSensorsCabinetReadingRow[]✓-Non-root temperature sensor reading rows.
alarmsDataItemsTimelineItemData[]✓-Active-warnings timeline items.
onNavigate((path: string) => void) | undefined-Router navigate used by warning rows to deep-link into the alert.
isLoadingboolean | undefined-Shows a spinner while the cabinet snapshot is loading.

MetricCard

Compact card displaying a labelled metric value with optional highlight and transparency states.

agent-ready

Props

PropTypeRequiredDefaultDescription
labelstring✓--
unitstring✓--
valuestring | number | null✓--
bgColorstring | undefined✓--
classNamestring | undefined✓--
noMinWidthboolean | undefined✓--
isValueMediumboolean | undefined✓--
isHighlightedboolean | undefined✓--
showDashForZeroboolean | undefined✓--
isTransparentColorboolean | undefined✓--

MiningPoolsPanel

Dashboard card that lists configured mining pools — one row per pool, with revenue, hash rate, and an optional "Show details" action.

Pure presentation: the row data + click handler come from props, shaped upstream by usePoolRows (or any caller producing MiningPoolRows).

agent-ready

Props

PropTypeRequiredDefaultDescription
labelstring-Override the card title — defaults to Mining Pools.
hideHeaderboolean-Hide the title row entirely.
isLoadingboolean-Loading state — renders skeleton rows.
skeletonRowsnumber-Number of skeleton rows to show while loading.
emptyMessagestring-Message shown when rows is empty.
rowsMiningPoolRow[]-Pool rows, in display order.
onShowDetails(row: MiningPoolRow) => void-Called when the user clicks the per-row "Show details" button.
classNamestring-Extra className for the root.

PoolDetailsCard

Compact key/value card for displaying pool metadata (URL, fee, worker count, etc.). Empty list renders a "No data available" placeholder.

agent-ready

Props

PropTypeRequiredDefaultDescription
labelstring | undefined✓--
underlineboolean | undefined✓--
classNamestring | undefined✓--
detailsPoolDetailItem[]✓--

PoolDetailsPopover

Button-triggered popover that displays a pool's key/value details (URL, fee, worker count, status, …) inside a Radix Dialog. Wraps PoolDetailsCard so the read-out matches the embedded card variant.

agent-ready

Props

PropTypeRequiredDefaultDescription
titlestring | undefined✓--
descriptionstring | undefined✓--
disabledboolean | undefined✓--
classNamestring | undefined✓--
triggerLabelstring | undefined✓--
detailsPoolDetailItem[]✓--

On this page