Renders the row of tabs of the index, profile and search pages.
f
TabBar<T extends string>(unnamed 0: TabBarProps<T>): React.JSX.Element
Renders a row of tabs that scrolls when they don't all fit, keeping the active one in view.
I
I
TabBarProps
The props of TabBar.
-
activeTab: T
The active tab's key.
-
className: string
An extra class for the scroller.
-
innerClassName: string
An extra class for the row.
-
leading: ReactNode
Optional content rendered before the tabs (e.g. a scope selector). Sits in the same line, aligned with them, and stays where it is while they scroll: it is outside the row that scrolls, which clips them at its edge.
-
onChange: (key: T) => void
Called with the key of the tab chosen.
-
tabs: Tab<T>[]
The tabs, in order.
Usage
import * as mod from "src/components/shared/TabBar.tsx";