Renders the tabs that put a list of playlists in another order, on the playlists page and on a profile's playlists tab, and the playlists page's tab of the viewer's own.
f
PlaylistSortTabs<T extends PlaylistsTab>(unnamed 0: PlaylistSortTabsProps<T>): React.JSX.Element
Renders one tab per entry of tabs, sort being the active one.
I
PlaylistSortTabsProps
Passed to PlaylistSortTabs by ProfilePlaylistsTab, whose tabs
are PLAYLIST_SORTS, and by Playlists, whose PLAYLISTS_TABS add the
viewer's own playlists for a signed-in user. Both keep the active one in
their URL's query.
-
leading: ReactNode
Goes before the tabs, as the playlists page's category menu does.
- onChange: (sort: T) => void
-
sort: T
The active tab.
-
tabs: readonly T[]
The tabs offered, in order.
Usage
import * as mod from "src/components/playlist/PlaylistSortTabs.tsx";