Socket
Per-socket panel showing the miner slotted into a container slot, its state, and quick actions. Displays a socket in a PDU with power/current info, miner sta…
Per-socket panel showing the miner slotted into a container slot, its state, and quick actions.
Displays a socket in a PDU with power/current info, miner status, and heatmap visualization
Features: - Power and current display - Miner status indicators - Heatmap mode with temperature/hashrate - Cooling fan indicator - Socket enable/disable states - Add miner flow
import { Socket } from "@tetherto/mdk-react-devkit";| Prop | Status | Type | Default | Description |
|---|---|---|---|---|
current_a | Optional | number | null | undefined | — | Current in amperes |
power_w | Optional | number | null | undefined | — | Power in watts |
enabled | Optional | boolean | undefined | — | Whether socket is enabled |
socket | Optional | number | null | undefined | — | Socket number/index |
selected | Optional | boolean | undefined | — | Whether socket is selected |
innerRef | Optional | React.ForwardedRef<HTMLDivElement> | undefined | — | Forwarded ref for the container |
miner | Optional | Miner | null | undefined | — | Miner data |
heatmap | Optional | Heatmap | null | undefined | — | Heatmap configuration |
isEditFlow | Optional | boolean | undefined | — | Whether in edit flow mode |
clickDisabled | Optional | boolean | undefined | — | Whether click is disabled |
cooling | Optional | boolean | undefined | — | Cooling status |
isEmptyPowerDashed | Optional | boolean | undefined | — | Whether to show dashed border for empty power |
isContainerControlSupported | Optional | boolean | undefined | — | Whether container control is supported |
pdu | Optional | Pdu | undefined | — | PDU information |
Usage
Per-socket panel representing a single PDU slot in a container. Shows the miner slotted into that slot, its power/current draw, operating status, heatmap data (temperature or hashrate), and quick actions (add miner, edit flow).
Minimal example
import { Socket } from "@tetherto/mdk-react-devkit";
<Socket socket={1} enabled={true} power_w={3250} current_a={14.5} />
Example
import { Socket } from '@tetherto/mdk-react-devkit'export const SocketExample = () => ( <div className="mdk-example-row"> <Socket socket={1} enabled={true} power_w={3250} current_a={14.5} /> <Socket socket={2} enabled={false} /> </div>)