MDK Logo
UI Kitreact-devkitComponentsFoundationWidgets

MinerPowerModeSelectionButtons

Segmented control letting an operator switch a miner between low / normal / turbo power modes.

Segmented control letting an operator switch a miner between low / normal / turbo power modes.

import { MinerPowerModeSelectionButtons } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
selectedDevicesOptionalDevice[] | undefined
setPowerModeOptional((devices: Device[], mode: string) => void) | undefined
connectedMinersOptionalDevice[] | undefined
powerModesLogOptionalUnknownRecord | undefined
disabledOptionalboolean | undefined
hasMarginOptionalboolean | undefined

Usage

Button group for selecting the operating power mode of selected miners. Reads available power modes from the device and dispatches the chosen mode through actionsStore.

Minimal example

import { MinerPowerModeSelectionButtons } from "@tetherto/mdk-react-devkit";

<MinerPowerModeSelectionButtons
  selectedDevices={[device]}
  setPowerMode={(devices, mode) => console.log(mode)}
/>

Example

import { MinerPowerModeSelectionButtons } from '@tetherto/mdk-react-devkit'export const MinerPowerModeSelectionButtonsExample = () => (  <div className="mdk-example-row">    <MinerPowerModeSelectionButtons      selectedDevices={[]}      setPowerMode={(_devices, mode) => console.warn('mode', mode)}      disabled={false}    />  </div>)