MDK Logo

Devkit General Types

General TypeScript types from react-devkit

General type definitions from the react-devkit package.

Package

@tetherto/mdk-react-devkit

Types

@tetherto/mdk-react-devkit

Import the public APIs on this page from @tetherto/mdk-react-devkit.

ActionButtonProps

type ActionButtonProps = { label?: string loading?: boolean disabled?: boolean className?: string variant?: TActionButtonVariant confirmation: ActionButtonConfirmation /** Confirmation mode: popover (inline) or dialog (modal). Default: popover */ mode?: 'popover'

ActualEbitdaCardProps

type ActualEbitdaCardProps = { value: number }

AddSparePartModalProps

Props for AddSparePartModal; option lists and handlers are supplied by the caller.

type AddSparePartModalProps = { isOpen: boolean; onClose: VoidFunction; partTypes: SparePartSubTypesModalPartType[]; defaultPartTypeId?: string; modelOptions: FormSelectOption[]; isModelOptionsLoading?: boolean; minerModelOptions: FormSelectOption[]; statusOptions: For

AddUserModalProps

type AddUserModalProps = { open: boolean onClose: VoidFunction roles: RoleOption[] onSubmit: (data: { name: string; email: string; role: string }) => Promise<void> isSubmitting?: boolean }

AlarmsBellButtonProps

type AlarmsBellButtonProps = { /** Severity-bucketed alarm counts rendered in the stacked badge. */ counts?: AlarmsBellButtonCounts /** Click handler — typically opens an alerts panel or routes to /alerts. */ onClick?: (event: MouseEvent<HTMLButtonElement>) => void /*…

AlertConfirmationModalProps

type AlertConfirmationModalProps = { isOpen: boolean onOk: VoidFunction }

AlertsProps

type AlertsProps = { /** * Devices payload powering the "Current Alerts" table. * Mirrors the API response shape of `useGetListThingsQuery({ ... alerts query })`. */ devices?: Device[][] /** * Loading flag for the "Current Alerts" table. */ isCurrentAlertsLo

AlertsTableTitleProps

type AlertsTableTitleProps = { title: ReactNode subtitle?: ReactNode className?: string }

AppHeaderProps

type AppHeaderProps = { /** Left-most slot — typically the app's brand lockup / logo. */ logo?: ReactNode /** Left-edge content — e.g. a sidebar collapse toggle button. */ start?: ReactNode /** Middle slot — typically the dashboard's stats strip. */ children?:

AreaChartProps

type AreaChartProps = { /** Chart data - required, provided by parent */ data: ChartJS<'line'>['data'] /** Chart.js options - merged with defaults */ options?: ChartJS<'line'>['options'] /** Custom HTML tooltip configuration. When provided, replaces the default…

ArrowIconProps

type ArrowIconProps = { isOpen?: boolean } & IconProps

AssignPoolModalProps

type AssignPoolModalProps = { isOpen: boolean onClose: () => void onSubmit: (values: { pool: PoolSummary }) => Promise<void> miners: Device[] poolConfig: PoolConfigData[] }

AverageDowntimeChartProps

type AverageDowntimeChartProps = Partial<{ title: string unit: string height: number barWidth: number className: string isLoading: boolean emptyMessage: string data: AverageDowntimeChartData /** Formats Y-axis ticks, tooltips, and bar data labels (values are 0–1 rates). *…

AvgAllInCostChartProps

type AvgAllInCostChartProps = { data?: ReadonlyArray<AvgAllInCostDataPoint> dateRange: FinancialDateRange | null isLoading?: boolean }

BadgeProps

type BadgeProps = { /** * Badge content (wraps children with badge) */ children?: ReactNode /** * Number to display in badge * If > overflowCount, will show "overflowCount+" */ count?: number /** * Maximum count to display * @default 99 */ overflowCount?: n

BarChartProps

type BarChartProps = { /** Chart data - required, provided by parent. Use `as any` for mixed bar+line datasets. */ data: any /** Chart.js options - merged with defaults */ options?: ChartJS<'bar'>['options'] /** Stack bars on top of each other */ isStacked?: b

BatchMoveSparePartsModalProps

Props for BatchMoveSparePartsModal; unselected location/status arrive as null on submit.

type BatchMoveSparePartsModalProps = { isOpen: boolean; onClose: VoidFunction; spareParts: BatchMoveSparePart[]; locationOptions: FormSelectOption[]; statusOptions: FormSelectOption[]; onSubmit: (values: { location: string | null; status: string | null; observation: string |

BitcoinPriceCardProps

type BitcoinPriceCardProps = { value: number }

BitcoinProducedCardProps

type BitcoinProducedCardProps = { value: number }

BitcoinProducedChartProps

type BitcoinProducedChartProps = { chartData: BarChartDataResult isLoading?: boolean hasAllZeros?: boolean height?: number }

BitcoinProductionCostCardProps

type BitcoinProductionCostCardProps = { value: number }

BitMainControlsTabProps

type BitMainControlsTabProps = { /** Device data */ data: Device }

BitMainHydroSettingsProps

type BitMainHydroSettingsProps = { /** Device data */ data?: Device }

BitMainImmersionSummaryBoxProps

type BitMainImmersionSummaryBoxProps = { data?: Device containerSettings?: BitMainImmersionSummaryBoxContainerSettings | null }
type BreadcrumbsProps = { items: BreadcrumbItem[] showBack?: boolean backLabel?: string className?: string itemClassName?: string backClassName?: string onBackClick?: VoidFunction separator?: ReactNode }

BtcAveragePriceProps

type BtcAveragePriceProps = Partial<{ /** * BTC price in USD; formatted with grouping and no decimal places. * When `null`, `undefined`, non-finite, or negative, the value shows `-` (`FALLBACK` from format utils). */ price: number | null /** * Label for the BTC avera…

BulkAddSparePartsModalProps

Props for BulkAddSparePartsModal; onSubmit receives the parsed CSV records.

type BulkAddSparePartsModalProps = { isOpen: boolean; onClose: VoidFunction; onSubmit: (records: CSVRecord[]) => Promise<{ error?: string } | void>; isLoading?: boolean; }

ButtonProps

Props for Button. Extends all native &lt;button&gt; attributes.

type ButtonProps = Partial< { /** Show a spinner instead of the content and disable the button. */ loading: boolean /** Make the button stretch to fill its container. */ fullWidth: boolean /** Icon node rendered alongside `children`. */ icon: ReactNode /** V…

CabinetDetailCardProps

type CabinetDetailCardProps = { /** Cabinet display title (`LV Cabinet 1` / transformer title). */ title: string /** Non-root powermeter reading rows. */ powerMeters: CabinetReadingRow[] /** The cabinet-root temperature reading, when present. */ rootTempSensor?: Cabine

CardBodyProps

Props for CardBody slot. Forwards all native &lt;div&gt; attributes.

type CardBodyProps = HTMLAttributes<HTMLDivElement>

CardFooterProps

Props for CardFooter slot. Forwards all native &lt;div&gt; attributes.

type CardFooterProps = HTMLAttributes<HTMLDivElement>

CardHeaderProps

Props for CardHeader slot. Forwards all native &lt;div&gt; attributes.

type CardHeaderProps = HTMLAttributes<HTMLDivElement>

CascaderProps

Cascader component props

type CascaderProps = { /** * Hierarchical options to display in the cascader * Parent options with children appear in the left panel * Child options appear in the right panel when parent is selected */ options: CascaderOption[] /** * Current selected value(s)…

ChangeConfirmationModalProps

type ChangeConfirmationModalProps = { open: boolean title: string onConfirm: VoidFunction onClose: VoidFunction children: ReactNode confirmText?: string destructive?: boolean }

ChartContainerProps

type ChartContainerProps = { title?: string /** * Optional node rendered immediately after the title text (e.g. an info * tooltip). Only shown when `title` is set and `header` is not. Additive - * omit it and the title renders exactly as before. */ titleExtra?: Reac

ChartExpandActionProps

type ChartExpandActionProps = { /** Whether the parent chart is currently expanded to full width. */ isExpanded: boolean /** Toggles the expanded state. */ onToggle?: VoidFunction }

ChartStatsFooterProps

type ChartStatsFooterProps = Partial<{ /** Min/Max/Avg values row */ minMaxAvg: MinMaxAvgValues /** Additional stats displayed in a columnar grid */ stats: ChartStatsFooterItem[] /** Number of stat items per column (default: 1) */ statsPerColumn: number /** Secondary…

CheckboxProps

type CheckboxProps = { /** * Size variant of the checkbox * @default 'md' */ size?: CheckboxSize /** * Color variant when checked * @default 'primary' */ color?: ComponentColor /** * Border radius variant * @default 'none' */ radius?: BorderRadius /** * Custom…

ConfirmDeleteSparePartModalProps

Props for ConfirmDeleteSparePartModal.

type ConfirmDeleteSparePartModalProps = { isOpen?: boolean; onClose?: VoidFunction; onConfirm?: (sparePart: ConfirmDeleteSparePartModalSparePart) => Promise<void> | void; sparePart?: ConfirmDeleteSparePartModalSparePart; isLoading?: boolean; }

ContainerChartsProps

type ContainerChartsProps = { /** When false, shows an empty state (feature gate). @default true */ featureEnabled?: boolean /** Message when `featureEnabled` is false */ disabledMessage?: string /** Options for the combination selector */ combinations: ContainerChar

ContainerControlsBoxProps

type ContainerControlsBoxProps = { data?: Device isBatch?: boolean isCompact?: boolean // --- data from outside (no API calls inside) --- selectedDevices?: Device[] pendingSubmissions?: PendingSubmission[] alarmsDataItems?: TimelineItemData[] tailLogData?: UnknownRecord[]…

ContainerDetailProps

type ContainerDetailProps = { /** * Container display name shown in the header. Optional — omit it when the * host already renders the container name as the page title (e.g. the shell's * `PageLayout`), so the name is not shown twice. */ name?: ReactNode /** Ordered…

ContainerWidgetCardProps

type ContainerWidgetCardProps = { /** Container display name shown in the header row. */ title: string /** Latest container power draw in watts (rendered in kW by the top row). */ power?: number /** Power unit label shown next to the reading. */ powerUnit?: string /** Pe…

ContainerWidgetsProps

type ContainerWidgetsProps = { /** Card-ready data for every container, shaped by the data hook. */ containers: ContainerWidgetItem[] /** Section heading. */ title?: string /** Shows a spinner while the first load is in flight. */ isLoading?: boolean /** Error message…

CostChartsProps

type CostChartsProps = { costLog: ReadonlyArray<CostTimeSeriesEntry> btcPriceLog: ReadonlyArray<BtcPriceTimeSeriesEntry> totals: CostSummaryMonetaryTotals | null dateRange: FinancialDateRange | null avgAllInCostData?: ReadonlyArray<AvgAllInCostDataPoint> isLoadi

CostContentProps

type CostContentProps = CostViewModelProps & CostQueryStateProps & { dateRange: FinancialDateRange | null /** Optional revenue/cost time-series for the Avg All-in Cost panel. */ avgAllInCostData?: ReadonlyArray<AvgAllInCostDataPoint> }

CostMetricsProps

type CostMetricsProps = { metrics: CostSummaryDisplayMetrics }

CostProps

type CostProps = CostContentProps & CostChromeProps

CurrentAlertsProps

type CurrentAlertsProps = { /** * Raw devices (with last.alerts) used to derive current alerts from. * Shape mirrors the API response from the source app. */ devices?: Device[][] isLoading?: boolean /** * Filters controlled outside (typically by URL severity param)…

DashboardDateRangePickerProps

type DashboardDateRangePickerProps = { /** Current range as `{ start, end }` epoch-millisecond timestamps. */ value: DashboardDateRange /** Fires with the next `{ start, end }` window when the user applies a range. */ onChange: (next: DashboardDateRange) => void /** Display f…

DataLabelProps

type DataLabelProps = Partial<{ /** * Range start; formatted in the active timezone (`dd/MM/yy`). */ startDate: Date | null /** * Range end; formatted in the active timezone (`dd/MM/yy`). */ endDate: Date | null /** * Label text; defaults to `PERIOD`. */ label:

DataTableProps

type DataTableProps = { /** * The data to be shown in the table. See https://tanstack.com/table/v8/docs/guide/data */ data: I[] /** * The column configuration table. See https://tanstack.com/table/v8/docs/guide/column-defs */ columns: DataTableColumnDef<I, any>…

DatePickerProps

type DatePickerProps = { /** * Currently selected date */ selected?: Date /** * Callback when date changes */ onSelect?: (date: Date | undefined) => void /** * Placeholder text when no date is selected * @default "Pick a date" */ placeholder?: string /** * Date…

DateRangePickerProps

type DateRangePickerProps = { /** * Selected date range */ selected?: DateRange /** * Callback when date range changes */ onSelect?: (range: DateRange | undefined) => void /** * Placeholder text when no range is selected * @default "Pick a date range" */ placeholder?

DetailLegendProps

type DetailLegendProps = { /** Legend items to display */ items: DetailLegendItem[] /** Callback when a legend item is toggled */ onToggle?: (label: string, index: number) => void /** Custom class name */ className?: string }

DeviceExplorerProps

type DeviceExplorerProps = { deviceType: DeviceExplorerDeviceType className?: string selectedDevices?: DataTableRowSelectionState onSelectedDevicesChange?: (selections: DataTableRowSelectionState) => void } & ForwardedToolbarProps & ForwardedTableProps

DialogContentProps

type DialogContentProps = { title?: string description?: string closeOnClickOutside?: boolean closeOnEscape?: boolean } & DialogHeaderProps

DialogHeaderProps

type DialogHeaderProps = { bare?: boolean closable?: boolean onClose?: VoidFunction }

DividerProps

type DividerProps = { /** Line orientation */ orientation?: DividerOrientation /** Line style */ dashed?: boolean dotted?: boolean /** Text or node rendered in the middle of the divider */ children?: ReactNode /** Horizontal alignment of the label */ align?:

DoughnutChartProps

type DoughnutChartProps = { /** Array of labelled slices */ data: DoughnutChartDataset[] /** Unit suffix shown in tooltips */ unit?: string /** Chart.js options – merged with defaults */ options?: ChartJS<'doughnut'>['options'] /** Doughnut cutout percentage (defau…

EbitdaChartsProps

type EbitdaChartsProps = { showEbitdaBarChart: boolean ebitdaChartData: BarChartDataResult btcDisplayData: BarChartDataResult isLoading: boolean hasBtcProducedAllZeros: boolean }

EbitdaHodlCardProps

type EbitdaHodlCardProps = { value: number currentBTCPrice: number }

EbitdaMetricsProps

type EbitdaMetricsProps = { metrics: EbitdaDisplayMetrics currentBTCPrice: number }

EbitdaProps

type EbitdaProps = { metrics: EbitdaDisplayMetrics | null ebitdaChartInput: ToBarChartDataInput | null btcProducedChartInput: ToBarChartDataInput | null hasBtcProducedAllZeros: boolean showEbitdaBarChart: boolean currentBTCPrice: number datePicker: ReactElem

EbitdaSellingCardProps

type EbitdaSellingCardProps = { value: number }

EfficiencyMinerTypeViewProps

type EfficiencyMinerTypeViewProps = Omit<EfficiencyBarViewProps, 'title'>

EfficiencyMinerUnitViewProps

type EfficiencyMinerUnitViewProps = Omit<EfficiencyBarViewProps, 'title'>

EfficiencySiteViewProps

type EfficiencySiteViewProps = { log?: MetricsEfficiencyLogEntry[] avgEfficiency?: number | null nominalValue?: number | null isLoading?: boolean dateRange?: EfficiencyDateRange onDateRangeChange?: (range: EfficiencyDateRange) => void onReset?: VoidFunction }

EmptyStateProps

type EmptyStateProps = { /** * Description text or ReactNode displayed below the image */ description: ReactNode /** * Image to display. Use "default" for the standard illustration, * "simple" for a minimal icon, or pass a custom ReactNode. * @default "default"

EnabledDisableToggleProps

type EnabledDisableToggleProps = { value: unknown tankNumber: number | string isButtonDisabled: boolean isOffline: boolean onToggle: (params: EnabledDisableToggleCbParams) => void }

EnergyBalanceCostChartsProps

type EnergyBalanceCostChartsProps = { costChartData: BarChartDataResult btcUnit: EnergyCostChartInput['btcUnit'] powerChartInput: ThresholdLineChartInput displayMode: DisplayMode barLabelFormatter: (v: number) => string onDisplayModeChange: (mode: DisplayMode) => void /** Sh…

EnergyBalanceCostMetricsProps

type EnergyBalanceCostMetricsProps = { metrics: EnergyCostMetrics }

EnergyBalancePowerChartProps

type EnergyBalancePowerChartProps = { height?: number fillHeight?: boolean periodType: PeriodType chartInput: ThresholdLineChartInput }

EnergyBalanceProps

type EnergyBalanceProps = { viewModel: EnergyBalanceViewModel onTabChange: (tab: EnergyBalanceTab) => void onRevenueDisplayModeChange: (mode: DisplayMode) => void onCostDisplayModeChange: (mode: DisplayMode) => void isDemoMode?: boolean /** Slot for timeframe / dat…

EnergyBalanceRevenueChartsProps

type EnergyBalanceRevenueChartsProps = { revenueChartData: BarChartDataResult averageDowntimeData: AverageDowntimeChartData powerChartInput: ThresholdLineChartInput displayMode: DisplayMode barLabelFormatter: (v: number) => string onDisplayModeChange: (mode: DisplayMode) => voi

EnergyBalanceRevenueMetricsProps

type EnergyBalanceRevenueMetricsProps = { metrics: EnergyRevenueMetrics }

EnergyCostChartProps

type EnergyCostChartProps = { chartData: BarChartDataResult btcUnit: EnergyCostChartInput['btcUnit'] displayMode: DisplayMode barLabelFormatter: (v: number) => string onDisplayModeChange: (mode: DisplayMode) => void height?: number }

EnergyMetricCardProps

type EnergyMetricCardProps = { name: string value: number unit: string fallback?: string }

EnergyReportMinerTypeViewProps

type EnergyReportMinerTypeViewProps = EnergyReportGroupedBarViewProps

EnergyReportMinerUnitViewProps

type EnergyReportMinerUnitViewProps = EnergyReportGroupedBarViewProps

EnergyReportProps

type EnergyReportProps = { defaultTab?: EnergyReportTabValue siteView?: Omit<EnergyReportSiteViewProps, 'dateRange'> & { dateRange?: EnergyReportDateRange } minerTypeView?: EnergyReportMinerTypeViewProps minerUnitView?: EnergyReportMinerUnitViewProps className?: s

EnergyReportSiteViewProps

type EnergyReportSiteViewProps = Omit<UseEnergyReportSiteInput, 'dateRange'> & { snapshotLoading?: boolean onRefetchSnapshot?: VoidFunction dateRange: EnergyReportDateRange onDateRangeChange?: (range: EnergyReportDateRange) => void }

EnergyRevenueChartProps

type EnergyRevenueChartProps = { chartData: BarChartDataResult displayMode: DisplayMode barLabelFormatter: (v: number) => string onDisplayModeChange: (mode: DisplayMode) => void height?: number }

ErrorCardProps

type ErrorCardProps = { /** * Error message string. Supports `\n` for line breaks. */ error: string /** * Title displayed above the error message * @default "Errors" */ title?: string /** * Display variant. "card" shows a bordered container, "inline" shows flat…

ExplorerDetailProps

type ExplorerDetailProps = { /** The active Explorer tab — selects which per-type panel renders. */ deviceType: DeviceExplorerDeviceType /** Router navigate used by alarm rows to deep-link into `/alerts/:id`. */ onNavigate?: (path: string) => void /** Compact layout…

ExplorerLayoutProps

type ExplorerLayoutProps = { /** Page heading. */ title?: string /** Optional header controls (export button, etc.) shown next to the title. */ headerActions?: ReactNode /** The list column — typically a tab switch plus the device/container table. */ list: ReactNode

ExportButtonProps

type ExportButtonProps = { /** Fires with the chosen format when the user picks an item. */ onExport: (format: ExportFormat) => void /** Formats to offer in the dropdown — defaults to `['csv', 'json']`. */ formats?: readonly ExportFormat[] /** Button label — defau…

FeatureFlagsSettingsProps

type FeatureFlagsSettingsProps = { featureFlags: Record<string, boolean> isEditingEnabled: boolean isLoading?: boolean isSaving?: boolean onSave: (flags: Record<string, boolean>) => void className?: string }

FormCascaderProps

type FormCascaderProps = BaseFormFieldProps<TFieldValues, TName> & { options: CascaderOption[] multiple?: boolean cascaderProps?: Omit< React.ComponentProps<typeof Cascader>, 'value' | 'onChange' | 'options' | 'placeholder' > }

FormCheckboxProps

type FormCheckboxProps = BaseFormFieldProps<TFieldValues, TName> & { checkboxProps?: React.ComponentProps<typeof Checkbox> layout?: 'row' | 'column' }

FormDatePickerProps

type FormDatePickerProps = BaseFormFieldProps<TFieldValues, TName> & { datePickerProps?: Omit<React.ComponentProps<typeof DatePicker>, 'selected' | 'onSelect'> }

FormInputProps

type FormInputProps = BaseFormFieldProps<TFieldValues, TName> & { type?: React.ComponentProps<typeof Input>['type'] variant?: React.ComponentProps<typeof Input>['variant'] inputProps?: Omit<React.ComponentProps<typeof Input>, 'type' | 'variant'> }

FormProps

Form wrapper that provides react-hook-form context to child components.

type FormProps = Omit< ComponentProps<'form'>, 'children' > & { form: UseFormReturn<TFieldValues> children: ReactNode }

FormRadioGroupProps

type FormRadioGroupProps = BaseFormFieldProps<TFieldValues, TName> & { options: FormRadioOption[] orientation?: 'horizontal' | 'vertical' radioGroupProps?: Omit< React.ComponentProps<typeof RadioGroup>, 'onValueChange' | 'defaultValue' | 'orientation' > }

FormSelectProps

type FormSelectProps = BaseFormFieldProps<TFieldValues, TName> & { options: FormSelectOption[] selectProps?: Omit<React.ComponentProps<typeof Select>, 'onValueChange' | 'defaultValue'> }

FormSwitchProps

type FormSwitchProps = BaseFormFieldProps<TFieldValues, TName> & { switchProps?: Omit<React.ComponentProps<typeof Switch>, 'checked' | 'onCheckedChange'> layout?: 'row' | 'column' }

FormTagInputProps

type FormTagInputProps = BaseFormFieldProps<TFieldValues, TName> & { options?: TagInputOption[] allowCustomTags?: boolean variant?: 'default' | 'search' tagInputProps?: Omit< React.ComponentProps<typeof TagInput>, 'value' | 'onTagsChange' | 'label' | 'placeholder'

FormTextAreaProps

type FormTextAreaProps = BaseFormFieldProps<TFieldValues, TName> & { textAreaProps?: React.ComponentProps<typeof TextArea> }

GaugeChartProps

type GaugeChartProps = { /** Value between 0 and 1 (e.g. 0.75 = 75%). Values outside the range are clamped. */ percent: number /** Arc colours in HEX format. */ colors?: string[] /** Arc thickness as a fraction of the gauge radius (0–1). */ arcWidth?: number /**…

HashBalanceCostPanelProps

type HashBalanceCostPanelProps = HashBalancePanelProps

HashBalanceProps

type HashBalanceProps = Partial<{ isError: boolean isLoading: boolean errorMessage: string className: string tabsClassName: string tabsListClassName: string data: HashRevenueResponse | null initialDateRange: FinancialDateRange onDateRangeChange: (dateRange: Finan

HashBalanceRevenuePanelProps

type HashBalanceRevenuePanelProps = HashBalancePanelProps & { currency: HashBalanceCurrency onCurrencyChange: (currency: HashBalanceCurrency) => void }

HashrateMinerTypeViewProps

type HashrateMinerTypeViewProps = { /** Hashrate log grouped by miner type (groupBy=miner). */ log?: HashrateGroupedLog isLoading?: boolean dateRange?: HashrateDateRange onDateRangeChange?: (range: HashrateDateRange) => void onReset?: VoidFunction }

HashrateMiningUnitViewProps

type HashrateMiningUnitViewProps = { /** Hashrate log grouped by container / mining unit (groupBy=container). */ log?: HashrateGroupedLog isLoading?: boolean dateRange?: HashrateDateRange onDateRangeChange?: (range: HashrateDateRange) => void onReset?: VoidFunction }

HashrateProps

type HashrateProps = { /** Tab selected on first render. Defaults to the Site View. */ defaultTab?: HashrateTabValue /** Props forwarded to the Site View tab. */ siteView?: HashrateSiteViewProps /** Props forwarded to the Miner Type View tab. */ minerTypeView?

HashrateSiteViewProps

type HashrateSiteViewProps = { /** Hashrate log grouped by miner type. */ log?: HashrateGroupedLog /** Loading state - drives the chart spinner. */ isLoading?: boolean /** Selected date range used by the host to drive the query. */ dateRange?: HashrateDateRange /** Fi…

HeaderConsumptionBoxProps

type HeaderConsumptionBoxProps = { icon?: ReactNode /** Current site-level power consumption, in megawatts. */ valueMw?: number /** Unit label — defaults to `MW`. */ unit?: string className?: string }

HeaderControlsSettingsProps

type HeaderControlsSettingsProps = { preferences: HeaderPreferences isLoading?: boolean onToggle: (key: keyof HeaderPreferences, value: boolean) => void onReset: VoidFunction className?: string }

HeaderEfficiencyBoxProps

type HeaderEfficiencyBoxProps = { icon?: ReactNode /** Efficiency in watts per TH/s. */ valueWthS?: number /** Unit label — defaults to `W/TH/S`. */ unit?: string className?: string }

HeaderHashrateBoxProps

type HeaderHashrateBoxProps = { icon?: ReactNode /** MOS-side aggregate hashrate in PH/s. */ mosPhs?: number /** Pool-side aggregate hashrate in PH/s. */ poolPhs?: number /** Hashrate unit label — defaults to `PH/s`. */ unit?: string /** Decimal places shown for both v…

HeaderMinersBoxProps

type HeaderMinersBoxProps = { /** Icon shown next to the "Miners" label. Caller-provided so the package stays icon-agnostic. */ icon?: ReactNode /** Total miners across the site (denominator of the `158 / 2,188` ratio). */ total?: number /** Online miners (the `158`…

HeaderStatsBarProps

type HeaderStatsBarProps = { /** Stat boxes to render in order, left-to-right. */ children: ReactNode /** Optional class hook. */ className?: string }

HeatmapLegendProps

type HeatmapLegendProps = { /** Value (or pre-formatted label) at the low end of the scale. */ min: number | string /** Value (or pre-formatted label) at the high end of the scale. */ max: number | string /** Unit suffix appended to `min`/`max`. */ unit?: string /*…

HeatmapProps

type HeatmapProps = { /** Rows of cells (row-major). Rows may be ragged. */ data: HeatmapCell[][] /** Range floor; auto-derived from the finite values when omitted. */ min?: number /** Range ceiling; auto-derived from the finite values when omitted. */ max?:

HistoricalAlertsProps

type HistoricalAlertsProps = { /** * Pre-fetched historical alerts log entries (each with a `thing` device payload). */ alerts?: Alert[] isLoading?: boolean /** * Filters and search tags coming from the parent (typically shared with `CurrentAlerts`). */ localFilters:

ImportExportSettingsProps

type ImportExportSettingsProps = { onExport: VoidFunction onImport: (data: SettingsExportData) => void onParseFile?: (file: File) => Promise<SettingsExportData> isExporting?: boolean isImporting?: boolean className?: string }

IndicatorProps

type IndicatorProps = { /** * Color variant of the indicator * @default 'gray' */ color?: IndicatorColor /** * Size variant of the indicator * @default 'md' */ size?: ComponentSize /** * Custom className for the root element */ className?: string /** * When tru…

InputProps

type InputProps = Omit<ComponentProps<'input'>, 'prefix' | 'size'> & { /** * Optional label displayed above the input */ label?: string /** * HTML id for the input. Required when using label for accessibility. */ id?: string /** * Variant of the input * - `…

LabeledCardProps

type LabeledCardProps = Partial<{ isDark: boolean className: string hasNoWrap: boolean isRelative: boolean isFullWidth: boolean hasNoMargin: boolean hasNoBorder: boolean isFullHeight: boolean isScrollable: boolean label: ReactNode children: ReactNode getNavigateO

LineChartCardProps

type LineChartCardProps = Partial<{ /** Pre-adapted chart data (use this OR rawData+dataAdapter) */ data: LineChartCardData /** Raw data to be transformed by dataAdapter */ rawData: unknown /** Adapter to transform rawData into LineChartCardData */ dataAdapter: (da

LoaderProps

type LoaderProps = { /** * Size of each dot in pixels * @default 10 */ size?: number /** * Number of dots to display * @default 5 */ count?: 3 | 5 | 7 /** * Color variant of the loader * @default 'orange' */ color?: 'red' | 'gray' | 'blue' | 'amber' | 'orang

LogActivityIconProps

type LogActivityIconProps = { status: string }

LogDotProps

type LogDotProps = { type: string status: string }

LogItemProps

type LogItemProps = { data: LogData onLogClicked?: (uuid: string) => void }

LogRowProps

type LogRowProps = { log: LogData type: string style?: CSSProperties onLogClicked?: (uuid: string) => void }

LogsCardProps

type LogsCardProps = Partial<{ type: string label: string isDark: boolean isLoading: boolean logsData: LogData[] emptyMessage: string skeletonRows: number pagination: LogPagination onLogClicked: (uuid: string) => void }>

ManageUserModalProps

type ManageUserModalProps = { open: boolean onClose: VoidFunction user: SettingsUser roles: RoleOption[] rolePermissions: Record<string, Record<string, PermLevel>> permissionLabels: Record<string, string> onSubmit: (data: { id: string; name: string; email: string; ro

MdkWordmarkProps

type MdkWordmarkProps = { /** Visual size of the wordmark. `sm` ≈ 24px tall, `md` ≈ 32px, `lg` ≈ 64px. */ size?: MdkWordmarkSize /** Optional class hook on the outer `<svg>`. */ className?: string /** Accessible label. Defaults to "MDK". */ title?: string }

MicroBTWidgetBoxProps

type MicroBTWidgetBoxProps = { data?: Device }

MinersSummaryBoxProps

type MinersSummaryBoxProps = { /** Array of label-value pairs to display in a 2-column grid */ params: MinersSummaryParam[] /** Additional CSS class name */ className?: string }

MiningPoolsPanelProps

type MiningPoolsPanelProps = Partial<{ /** Override the card title — defaults to `Mining Pools`. */ label: string /** Hide the title row entirely. */ hideHeader: boolean /** Loading state — renders skeleton rows. */ isLoading: boolean /** Number of skeleton rows to sh…

MinMaxAvgProps

type MinMaxAvgProps = MinMaxAvgValues & { className?: string }

MonthlyEbitdaChartProps

type MonthlyEbitdaChartProps = { chartData: BarChartDataResult height?: number }

MovementDetailsModalProps

Props for MovementDetailsModal; pass the selected movement and open/close handlers.

type MovementDetailsModalProps = Partial<{ isOpen: boolean onClose: () => void movement: MovementData }>

MoveSparePartModalProps

Props for MoveSparePartModal.

type MoveSparePartModalProps = { isOpen?: boolean; onClose?: VoidFunction; sparePart?: MoveSparePartModalSparePart; requestedValues?: { location?: string; status?: string }; locationOptions: FormSelectOption[]; statusOptions: FormSelectOption[]; onSubmit: ( values: { lo

MultiSelectProps

type MultiSelectProps = { options: MultiSelectOption[] /** Controlled selected values. Omit to use `defaultValue` for uncontrolled mode. */ value?: string[] /** Initial values for uncontrolled mode. Ignored when `value` is provided. */ defaultValue?: string[] onV

NotFoundPageProps

type NotFoundPageProps = { /** * Callback fired when the "Go Home" button is clicked */ onGoHome?: VoidFunction /** * Page title * @default "404" */ title?: string /** * Message displayed below the title * @default "The page you are looking for does not exist." */

OperationalDashboardProps

Props for the operational dashboard composite.

type OperationalDashboardProps = Partial<{ hashrate: OperationalDashboardTrendInput consumption: OperationalDashboardTrendInput efficiency: OperationalDashboardTrendInput miners: OperationalDashboardMinersInput /** Optional controls (e.g. a date-range picker) rendered abo…

OperationalMinersStatusChartProps

Props for the miners-status chart component.

type OperationalMinersStatusChartProps = Partial<{ data: MinersStatusChartData isLoading: boolean isExpanded: boolean onToggleExpand: VoidFunction }>

OperationsEfficiencyProps

type OperationsEfficiencyProps = { defaultTab?: EfficiencyTabValue siteView?: EfficiencySiteViewProps minerTypeView?: EfficiencyMinerTypeViewProps minerUnitView?: EfficiencyMinerUnitViewProps }

OperationsEnergyChartProps

type OperationsEnergyChartProps = { totals: CostSummaryMonetaryTotals | null isLoading?: boolean }

OperationsEnergyCostChartProps

type OperationsEnergyCostChartProps = Partial<{ title: string unit: string height: number className: string isLoading: boolean emptyMessage: string data: OperationsEnergyCostChartData }>

PaginationProps

type PaginationProps = { /** * Current active page number */ current?: number /** * Total number of items */ total?: number /** * Number of items per page * @default 20 */ pageSize?: number /** * Page size options for the select dropdown * @default [10, 20, 50,…

PendingActionsButtonProps

type PendingActionsButtonProps = { /** Click handler override — defaults to toggling the actionsStore sidebar. */ onClick?: (event: MouseEvent<HTMLButtonElement>) => void className?: string }

PoolDetailsCardProps

type PoolDetailsCardProps = PoolDetailsCardPartialProps & { details: PoolDetailItem[] }

PoolManagerMinerExplorerProps

type PoolManagerMinerExplorerProps = { /** Miners to render in the explorer table. */ miners: ListThingsDevice[] /** Pool configurations powering the "Assign Pool" dropdown. */ poolConfig: PoolConfigData[] /** Called when the operator clicks the "Pool Manager" back link. */ b

PoolManagerPoolsProps

type PoolManagerPoolsProps = { /** Array of pool configurations to render. */ poolConfig: PoolConfigData[] /** Called when the operator clicks the "Pool Manager" back link. */ backButtonClick: VoidFunction }

PoolManagerProps

type PoolManagerProps = { /** Pool configurations shared by every sub-view (Pools, Miner Explorer, Sites). */ poolConfig: PoolConfigData[] /** Dashboard site-level stat blocks. */ stats?: DashboardStats /** Dashboard stats loading flag. */ isStatsLoading?: boolea

PoolManagerSiteOverviewDetailsProps

type PoolManagerSiteOverviewDetailsProps = { /** The site (container unit) to render details for. */ unit: UnitData /** Display name shown in the breadcrumb (`Site Overview / <unitName>`). */ unitName: string /** Pool configurations powering the per-pool detail rows. */ poolConfig:

PoolManagerSitesOverviewProps

type PoolManagerSitesOverviewProps = { /** Sites to render (already normalised through `useSitesOverviewData`). */ units: ProcessedContainerUnit[] /** Pool configurations powering each card's pool summary. */ poolConfig: PoolConfigData[] /** Show a skeleton placeholder while…

PowerModeTimelineChartProps

Props for PowerModeTimelineChart.

type PowerModeTimelineChartProps = Partial<{ /** Initial power-mode entries (each with start/end ts + mode). */ data: PowerModeTimelineEntry[] /** Streaming updates appended to the initial data. */ dataUpdates: PowerModeTimelineEntry[] /** Show a loading skeleton instead of…

ProductionCostChartProps

type ProductionCostChartProps = { costLog: ReadonlyArray<CostTimeSeriesEntry> btcPriceLog: ReadonlyArray<BtcPriceTimeSeriesEntry> dateRange: FinancialDateRange | null isLoading?: boolean }

ProfileMenuProps

type ProfileMenuProps = { /** Items rendered in the dropdown, top-to-bottom. Defaults to a single "Sign out" item. */ items: ProfileMenuItem[] /** Optional user label rendered at the top of the dropdown (e.g. an email). */ user?: ReactNode /** Override the trigge…

RadioGroupProps

type RadioGroupProps = { /** * Layout orientation * @default 'vertical' */ orientation?: 'horizontal' | 'vertical' /** * Remove gap between radio items * @default false */ noGap?: boolean /** * Custom className for the group */ className?: string } & ComponentPr

RadioProps

type RadioProps = { /** * Size variant of the radio * @default 'md' */ size?: ComponentSize /** * Color variant when checked * @default 'default' */ color?: ComponentColor /** * Border radius variant (full makes it circular) * @default 'full' */ radius?: Bo

RBACControlSettingsProps

type RBACControlSettingsProps = { users: SettingsUser[] roles: RoleOption[] rolePermissions: Record<string, Record<string, PermLevel>> permissionLabels: Record<string, string> canWrite: boolean isLoading?: boolean onCreateUser: (data: { name: string; email: string; role:

RepairLogChangesSubRowProps

type RepairLogChangesSubRowProps = { /** * The repair batch action whose part changes should be displayed. */ batchAction: RepairBatchAction /** * Devices referenced by the batch action, pre-fetched by the parent. */ devices: RepairDevice[] /** * Show a spinner while the pa…

ReportTimeFrameSelectorProps

type ReportTimeFrameSelectorProps = Pick< ReportTimeFrameSelectorState, 'presetTimeFrame' | 'dateRange' | 'setPresetTimeFrame' | 'setDateRange' >

RequireAuthProps

type RequireAuthProps = { /** Rendered when a token is present. */ children: ReactNode /** Rendered when no token is present — typically `<Navigate to="/signin" />`. */ fallback: ReactNode /** * When true (default), the current location is persisted to sessionSto…

RevenueChartProps

Props for RevenueChart; pass pre-fetched data and optional legend layout overrides.

type RevenueChartProps = Partial<{ data: RevenueDataItem[] isLoading: boolean siteList: (string | SiteItem)[] legendPosition: Position legendAlign: 'start' | 'center' | 'end' }>

SelectProps

type SelectProps = ComponentPropsWithoutRef<typeof SelectPrimitive.Root> & { /** * Show a clear button when a value is selected * @default false */ allowClear?: boolean }

SettingsDashboardProps

type SettingsDashboardProps = { dangerActions?: ActionButtonProps[] headerControlsProps?: HeaderControlsSettingsProps rbacControlProps?: RBACControlSettingsProps importExportProps?: ImportExportSettingsProps featureFlagsProps?: FeatureFlagsSettingsProps showFeatureFlag

SidebarProps

type SidebarProps = SidebarOptions & SidebarCallbacks & { items: SidebarMenuItem[] }

SignInGoogleButtonProps

type SignInGoogleButtonProps = Omit<ButtonProps, 'onClick' | 'children'> & { /** * Base URL of the OAuth backend (no trailing slash). Click navigates to * `${oauthBaseUrl}/oauth/google`. */ oauthBaseUrl: string /** Override the visible button label. */ label?: string /*…

SiteStatsBarProps

type SiteStatsBarProps = { /** Site label rendered in the header row. */ title: string /** Current site-level power consumption, in watts (or whatever `powerUnit` says). */ power?: number /** Display unit for `power` — defaults to `kW`. */ powerUnit?: string /** A…

SkeletonBlockProps

type SkeletonBlockProps = Partial<{ circle: boolean className: string width: number | string height: number | string borderRadius: number | string }>

SocketProps

type SocketProps = { /** Current in amperes */ current_a?: number | null /** Power in watts */ power_w?: number | null /** Whether socket is enabled */ enabled?: boolean /** Socket number/index */ socket?: number | null /** Whether socket is selected */ sele

SparePartSubTypesModalProps

Props for SparePartSubTypesModal; the active part type is controlled by the caller.

type SparePartSubTypesModalProps = { isOpen: boolean; onClose: VoidFunction; partTypes: SparePartSubTypesModalPartType[]; activePartTypeId: string; onPartTypeChange: (id: string) => void; subTypes: string[]; onAddSubType: (name: string) => Promise<{ error?: string } | void>…

SpinnerProps

type SpinnerProps = { /** * Size variant of the spinner * @default 'md' */ size?: ComponentSize /** * Color variant of the spinner * @default 'primary' */ color?: 'primary' | 'secondary' /** * Whether to display in fullscreen mode * @default false */ fullScre

SupplyLiquidBoxProps

type SupplyLiquidBoxProps = { data?: Device containerSettings?: SupplyLiquidBoxContainerSettings | null }

SwitchProps

type SwitchProps = { /** * Size variant of the switch * @default 'md' */ size?: ComponentSize /** * Color variant when checked * @default 'default' */ color?: ComponentColor /** * Border radius variant * @default 'none' */ radius?: BorderRadius /** * Custom…

TagFilterBarProps

type TagFilterBarProps = { filterTags: string[] localFilters: AlertLocalFilters onSearchTagsChange: (tags: string[]) => void onLocalFiltersChange: (filters: AlertLocalFilters) => void /** * Site-specific overrides for the "type" filter children. * If provided, the…

TagInputProps

type TagInputProps = { /** * Controlled tags (array of tag values) */ value?: string[] /** * Callback when tags change (add/remove) */ onTagsChange?: (tags: string[]) => void /** * Callback when input value changes (typing). Receives current input value. Usefu…

TagProps

type TagProps = { /** * Color variant of the tag * @default 'dark' */ color?: 'dark' | 'red' | 'green' | 'amber' | 'blue' /** * Custom className for the root element */ className?: string /** * Children content */ children?: ReactNode } & ComponentPropsWi

TankRowProps

type TankRowProps = { label: string temperature: number unit: string oilPumpEnabled: boolean waterPumpEnabled: boolean color: string flash?: boolean tooltip?: string pressure: TankRowPressure }

TanksBoxProps

type TanksBoxProps = { data?: { oil_pump: Tank[] water_pump: WaterPump[] pressure: TanksBoxPressure[] } }

TextAreaProps

type TextAreaProps = ComponentProps<'textarea'> & { /** * Optional label displayed above the textarea */ label?: string /** * HTML id for the textarea. Required when using label for accessibility. */ id?: string /** * Validation error message. When provided, d…

ThresholdLineChartProps

type ThresholdLineChartProps = Partial<{ title: string unit: string height: number /** When true, uses a taller default height (360px). */ isTall: boolean className: string emptyMessage: string isLegendVisible: boolean data: ThresholdLineChartData yTicksFormatter: (valu

TimeframeControlsProps

type TimeframeControlsProps = Partial<{ hint: string onReset: VoidFunction showResetButton: boolean isWeekSelectVisible: boolean isMonthSelectVisible: boolean layout: 'horizontal' | 'stacked' dateRange: TimeframeControlsDateRange timeframeType: TimeframeTypeValue | nul

TimeframeWeekFlatContentProps

type TimeframeWeekFlatContentProps = { visibleWeeks: ReturnType<typeof weeksOfMonth> }

TimeframeWeekTreeContentProps

type TimeframeWeekTreeContentProps = { timezone: string selectedYear: number selectedMonth: number }

TimelineChartProps

type TimelineChartProps = { initialData: TimelineChartData newData?: TimelineChartData skipUpdates?: boolean range?: ChartRange axisTitleText?: AxisTitleText isLoading?: boolean title?: string height?: number }

TimelineSelectorProps

type TimelineSelectorProps = { /** Currently selected timeline value (e.g. `'1m'`, `'5m'`). */ value: string /** Called whenever the user picks a new option. */ onChange: (next: string) => void /** * Available options — defaults to {@link getTimelineOptions}. Pass a c…

TypographyProps

type TypographyProps = { /** * Typography variant * @default 'body' */ variant?: 'heading1' | 'heading2' | 'heading3' | 'body' | 'secondary' | 'caption' /** * Text size * @default undefined (uses variant default) */ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl

WidgetTopRowProps

type WidgetTopRowProps = { title: string power?: number unit?: string statsErrorMessage?: string | ErrorWithTimestamp[] | null alarms?: AlarmsMap className?: string }

On this page

PackageTypesActionButtonPropsActualEbitdaCardPropsAddSparePartModalPropsAddUserModalPropsAlarmsBellButtonPropsAlertConfirmationModalPropsAlertsPropsAlertsTableTitlePropsAppHeaderPropsAreaChartPropsArrowIconPropsAssignPoolModalPropsAverageDowntimeChartPropsAvgAllInCostChartPropsBadgePropsBarChartPropsBatchMoveSparePartsModalPropsBitcoinPriceCardPropsBitcoinProducedCardPropsBitcoinProducedChartPropsBitcoinProductionCostCardPropsBitMainControlsTabPropsBitMainHydroSettingsPropsBitMainImmersionSummaryBoxPropsBreadcrumbsPropsBtcAveragePricePropsBulkAddSparePartsModalPropsButtonPropsCabinetDetailCardPropsCardBodyPropsCardFooterPropsCardHeaderPropsCascaderPropsChangeConfirmationModalPropsChartContainerPropsChartExpandActionPropsChartStatsFooterPropsCheckboxPropsConfirmDeleteSparePartModalPropsContainerChartsPropsContainerControlsBoxPropsContainerDetailPropsContainerWidgetCardPropsContainerWidgetsPropsCostChartsPropsCostContentPropsCostMetricsPropsCostPropsCurrentAlertsPropsDashboardDateRangePickerPropsDataLabelPropsDataTablePropsDatePickerPropsDateRangePickerPropsDetailLegendPropsDeviceExplorerPropsDialogContentPropsDialogHeaderPropsDividerPropsDoughnutChartPropsEbitdaChartsPropsEbitdaHodlCardPropsEbitdaMetricsPropsEbitdaPropsEbitdaSellingCardPropsEfficiencyMinerTypeViewPropsEfficiencyMinerUnitViewPropsEfficiencySiteViewPropsEmptyStatePropsEnabledDisableTogglePropsEnergyBalanceCostChartsPropsEnergyBalanceCostMetricsPropsEnergyBalancePowerChartPropsEnergyBalancePropsEnergyBalanceRevenueChartsPropsEnergyBalanceRevenueMetricsPropsEnergyCostChartPropsEnergyMetricCardPropsEnergyReportMinerTypeViewPropsEnergyReportMinerUnitViewPropsEnergyReportPropsEnergyReportSiteViewPropsEnergyRevenueChartPropsErrorCardPropsExplorerDetailPropsExplorerLayoutPropsExportButtonPropsFeatureFlagsSettingsPropsFormCascaderPropsFormCheckboxPropsFormDatePickerPropsFormInputPropsFormPropsFormRadioGroupPropsFormSelectPropsFormSwitchPropsFormTagInputPropsFormTextAreaPropsGaugeChartPropsHashBalanceCostPanelPropsHashBalancePropsHashBalanceRevenuePanelPropsHashrateMinerTypeViewPropsHashrateMiningUnitViewPropsHashratePropsHashrateSiteViewPropsHeaderConsumptionBoxPropsHeaderControlsSettingsPropsHeaderEfficiencyBoxPropsHeaderHashrateBoxPropsHeaderMinersBoxPropsHeaderStatsBarPropsHeatmapLegendPropsHeatmapPropsHistoricalAlertsPropsImportExportSettingsPropsIndicatorPropsInputPropsLabeledCardPropsLineChartCardPropsLoaderPropsLogActivityIconPropsLogDotPropsLogItemPropsLogRowPropsLogsCardPropsManageUserModalPropsMdkWordmarkPropsMicroBTWidgetBoxPropsMinersSummaryBoxPropsMiningPoolsPanelPropsMinMaxAvgPropsMonthlyEbitdaChartPropsMovementDetailsModalPropsMoveSparePartModalPropsMultiSelectPropsNotFoundPagePropsOperationalDashboardPropsOperationalMinersStatusChartPropsOperationsEfficiencyPropsOperationsEnergyChartPropsOperationsEnergyCostChartPropsPaginationPropsPendingActionsButtonPropsPoolDetailsCardPropsPoolManagerMinerExplorerPropsPoolManagerPoolsPropsPoolManagerPropsPoolManagerSiteOverviewDetailsPropsPoolManagerSitesOverviewPropsPowerModeTimelineChartPropsProductionCostChartPropsProfileMenuPropsRadioGroupPropsRadioPropsRBACControlSettingsPropsRepairLogChangesSubRowPropsReportTimeFrameSelectorPropsRequireAuthPropsRevenueChartPropsSelectPropsSettingsDashboardPropsSidebarPropsSignInGoogleButtonPropsSiteStatsBarPropsSkeletonBlockPropsSocketPropsSparePartSubTypesModalPropsSpinnerPropsSupplyLiquidBoxPropsSwitchPropsTagFilterBarPropsTagInputPropsTagPropsTankRowPropsTanksBoxPropsTextAreaPropsThresholdLineChartPropsTimeframeControlsPropsTimeframeWeekFlatContentPropsTimeframeWeekTreeContentPropsTimelineChartPropsTimelineSelectorPropsTypographyPropsWidgetTopRowProps