ui/client/features/shell/hooks/useShellTabs
Cockpit client (features), next. Source: ui/client/features/shell/hooks/useShellTabs.tsx.
Functions#
ShellTabsProvider()#
ShellTabsProvider(
__namedParameters):FunctionComponentElement<ProviderProps<SlotsApi|null>>
Defined in: ui/client/features/shell/hooks/useShellTabs.tsx:22
Holds tabs registered by features. Mounted once by the shell; features call useRegisterShellTab (below) and never touch each other's panels.
Parameters#
__namedParameters
children
ReactNode
Returns#
FunctionComponentElement<ProviderProps<SlotsApi | null>>
useRegisterShellTab()#
useRegisterShellTab(
region,tab):void
Defined in: ui/client/features/shell/hooks/useShellTabs.tsx:43
Registers tab in region while the calling component is mounted. Calling
it again with a changed tab replaces that tab in place (its position is kept),
so a feature can pass a fresh tab object whenever its state changes. The
tab's render runs inside the shell, not in the caller.
Parameters#
region
tab
Returns#
void
useShellTabs()#
useShellTabs(
region):ShellTab[]
Defined in: ui/client/features/shell/hooks/useShellTabs.tsx:35
Tabs registered by features for one region (empty outside the provider).
Parameters#
region
Returns#
ShellTab[]