moderator-toolbox-nxg-for-reddit / shared/window/WindowTabs

shared/window/WindowTabs

Functions

isSection()

isSection(item): item is WindowTabSection

Defined in: extension/data/shared/window/WindowTabs.tsx:38

Parameters

item

WindowTabItem

Returns

item is WindowTabSection


WindowTabs()

WindowTabs(__namedParameters): Element

Defined in: extension/data/shared/window/WindowTabs.tsx:42

Parameters

__namedParameters
className?

string

Additional class name applied to the outermost wrapper element.

contentOverride?

ReactNode

When set, shown in the content pane instead of the active tab’s content. Uses a stable DOM node so scroll position is preserved across tab switches.

defaultTabIndex

number = 0

Index of the initially selected tab (indexes only count actual tabs, not sections)

hiddenTabIndices?

Set<number>

Set of tab indices whose buttons should be hidden in the sidebar

hideTabButtons?

boolean = false

If true, hides the tab buttons while still rendering sidebarHeader and content

onTabChange?

(index) => void

Called when the active tab changes

sidebarHeader?

ReactNode

Content rendered above the tab list in the sidebar

tabs

WindowTabItem[]

List of tabs and section headers to display

vertical?

boolean = false

If true, tabs will be oriented vertically

Returns

Element

Interfaces

WindowTab

Defined in: extension/data/shared/window/WindowTabs.tsx:15

A selectable tab with content.

Properties

content

content: ReactNode

Defined in: extension/data/shared/window/WindowTabs.tsx:18

footer?

optional footer?: ReactNode

Defined in: extension/data/shared/window/WindowTabs.tsx:22

Footer rendered below the tab content; overrides the global WindowTabs footer when set.

moduleId?

optional moduleId?: string

Defined in: extension/data/shared/window/WindowTabs.tsx:24

Optional identifier used by callers to associate this tab with a domain object (e.g. module ID).

title

title: string

Defined in: extension/data/shared/window/WindowTabs.tsx:16

toggle?

optional toggle?: WindowTabToggle

Defined in: extension/data/shared/window/WindowTabs.tsx:20

Optional checkbox shown inside the tab button for module enable/disable.

tooltip?

optional tooltip?: string

Defined in: extension/data/shared/window/WindowTabs.tsx:17


WindowTabSection

Defined in: extension/data/shared/window/WindowTabs.tsx:28

A non-selectable section header divider in the tab list.

Properties

kind

kind: "section"

Defined in: extension/data/shared/window/WindowTabs.tsx:29

label

label: string

Defined in: extension/data/shared/window/WindowTabs.tsx:30

scrollable?

optional scrollable?: boolean

Defined in: extension/data/shared/window/WindowTabs.tsx:32

If true, this section and its tabs are wrapped in a scrollable container


WindowTabToggle

Defined in: extension/data/shared/window/WindowTabs.tsx:8

Optional enable/disable checkbox shown inside a tab button.

Properties

checked

checked: boolean

Defined in: extension/data/shared/window/WindowTabs.tsx:9

disabled?

optional disabled?: boolean

Defined in: extension/data/shared/window/WindowTabs.tsx:11

onChange

onChange: (checked) => void

Defined in: extension/data/shared/window/WindowTabs.tsx:10

Parameters
checked

boolean

Returns

void

Type Aliases

WindowTabItem

WindowTabItem = WindowTab | WindowTabSection

Defined in: extension/data/shared/window/WindowTabs.tsx:36

Union type for items in the tab list: either a selectable tab or a section header.