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";| Prop | Status | Type | Default | Description |
|---|---|---|---|---|
selectedDevices | Optional | Device[] | undefined | — | — |
setPowerMode | Optional | ((devices: Device[], mode: string) => void) | undefined | — | — |
connectedMiners | Optional | Device[] | undefined | — | — |
powerModesLog | Optional | UnknownRecord | undefined | — | — |
disabled | Optional | boolean | undefined | — | — |
hasMargin | Optional | boolean | 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>)