MDK Logo
UI Kitreact-devkitComponentsFoundationWidgets

ContainerFansCard

Card displaying the array of cooling fans in a container with live state per fan. Displays a grid of fan status indicators. Shows fan number and on/off state…

Card displaying the array of cooling fans in a container with live state per fan.

Displays a grid of fan status indicators. Shows fan number and on/off state with icon.

import { ContainerFansCard } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
fansDataOptionalPumpItem[] | undefined

Usage

ContainerFansCard renders a grid of fan status items for a container. ContainerFanLegend is the individual fan strip showing fan number and on/off icon.

ContainerFansCard Props

PropTypeRequiredDefaultDescription
fansData{ enabled?: boolean; index: number }[]noArray of fan state objects. Returns null when empty or absent.

ContainerFanLegend Props

PropTypeRequiredDefaultDescription
indexnumber | nullnoFan number displayed as a label.
enabledbooleannofalseRunning state; controls icon and colour class.
classNamestringnoAdditional CSS class.

Minimal example

import { ContainerFansCard, ContainerFanLegend } from "@tetherto/mdk-react-devkit";

<ContainerFansCard fansData={[{ enabled: true, index: 0 }, { enabled: false, index: 1 }]} />
<ContainerFanLegend index={1} enabled={true} />

Examples

import { ContainerFansCard } from '@tetherto/mdk-react-devkit'export const ContainerFansCardExample = () => (  <div className="mdk-example-row">    <ContainerFansCard      fansData={[        { enabled: true, index: 0 },        { enabled: false, index: 1 },        { enabled: true, index: 2 },      ]}    />  </div>)
import { ContainerFanLegend } from '@tetherto/mdk-react-devkit'export const ContainerFanLegendExample = () => (  <div className="mdk-example-row">    <ContainerFanLegend index={1} enabled={true} />    <ContainerFanLegend index={2} enabled={false} />  </div>)