MDK Logo
UI Kitreact-devkitComponentsFoundationWidgets

AddReplaceMinerDialog

Modal for adding a new miner to a slot or swapping the existing one with a replacement unit.

Modal for adding a new miner to a slot or swapping the existing one with a replacement unit.

import { AddReplaceMinerDialog } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
openRequiredboolean
onCloseRequiredVoidFunction
selectedSocketToReplaceOptionalUnknownRecord | undefined
selectedEditSocketOptionalUnknownRecord | undefined
currentDialogFlowOptionalstring | undefined
isDirectToMaintenanceModeOptionalboolean | undefined
minersTypeOptionalstring | undefined
isContainerEmptyOptionalboolean | undefined

Usage

Modal for adding a new miner to an empty slot or swapping the existing unit with a replacement. Orchestrates the add/replace/maintenance flow.

Minimal example

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

<AddReplaceMinerDialog
  open={isOpen}
  onClose={() => setIsOpen(false)}
/>

Example

import { useState } from 'react'import { AddReplaceMinerDialog } from '@tetherto/mdk-react-devkit'export const AddReplaceMinerDialogExample = () => {  const [open, setOpen] = useState(false)  return (    <div className="mdk-example-row">      <button onClick={() => setOpen(true)}>Add / Replace Miner</button>      <AddReplaceMinerDialog open={open} onClose={() => setOpen(false)} />    </div>  )}