moderator-toolbox-nxg-for-reddit / modules/config/components/ConfigOverlay

modules/config/components/ConfigOverlay

Functions

showConfigOverlay()

showConfigOverlay(options): ConfigOverlayHandle

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:136

Mounts a ConfigOverlay into the page body, deduplicating by options.cssClass.

Parameters

options

ConfigOverlayOptions

Returns

ConfigOverlayHandle

A handle for switching tabs or closing the overlay.


switchConfigOverlayTab()

switchConfigOverlayTab(overlayClass, tabId): void

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:191

Drop-in replacement for legacyWindow’s switchOverlayTab(overlayClass, tabId).

Parameters

overlayClass

string

tabId

string

Returns

void

Interfaces

ConfigOverlayHandle

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:42

Handle returned by showConfigOverlay, allowing callers to imperatively switch tabs or close the overlay.

Properties

close

close: () => void

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:48

Unmounts and removes the overlay.

Returns

void

setTabs

setTabs: (tabs) => void

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:46

Replaces the overlay’s tab list in place, without remounting or losing the active tab.

Parameters
tabs

ConfigOverlayTab[]

Returns

void

switchTab

switchTab: (tabId) => void

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:44

Switches the active tab by its derived ID.

Parameters
tabId

string

Returns

void


ConfigOverlayOptions

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:29

Options for opening a ConfigOverlay.

Properties

cssClass?

optional cssClass?: string

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:35

CSS class used to deduplicate overlays; a second call with the same class returns the existing handle.

details?

optional details?: Record<string, string | undefined>

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:36

onClose?

optional onClose?: () => void

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:38

Called after the overlay is closed and unmounted.

Returns

void

tabs

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:33

List of tabs to render.

title

title: string

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:31

Window title displayed in the overlay header.


ConfigOverlayTab

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:13

Describes a single tab in a ConfigOverlay.

Properties

advanced?

optional advanced?: boolean

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:25

When true the tab is only visible when advanced mode is enabled.

contentNode?

optional contentNode?: ReactNode

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:21

React node for tab body - lazy-mounted (only rendered when the tab is active).

id?

optional id?: string

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:15

Explicit tab ID; if omitted, derived from title.

title

title: string

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:17

Tab label shown in the tab bar.

tooltip?

optional tooltip?: string

Defined in: extension/data/modules/config/components/ConfigOverlay.tsx:19

Tooltip shown on the tab.