Saltar al contenido
CtrlK

ArdoSidebarSection

En esta página
Esta referencia de la API se genera a partir de los comentarios de TypeScript en inglés. Los nombres, las firmas y los ejemplos corresponden al paquete publicado.

Marker component for declaring one section tab and panel inside ArdoSidebar.

ArdoSidebar reads this element's props before React renders it. When used outside ArdoSidebar, it only renders its children.

import { ArdoSidebarSection } from "ardo/ui"

<ArdoSidebarSection id={…} label={…} to={…}>{children}</ArdoSidebarSection>

Props

NameTypeRequiredDescription
idstringYesStable section id, usually matching a top-level route segment.
labelstringYesVisible tab label.
toRoutePathYesLanding route for the section tab.
iconReactNodeNoTab icon. Defaults to the catalog icon for known section ids such as
guide, api or adr; other ids get a text-only tab. Pass null to
drop the icon.
match((pathname: string) => boolean) | RegExp | stringNoOptional active-route override. Defaults to matching the first segment of to.
childrenReactNodeNoSidebar content for this section.

Props type: ArdoSidebarSectionProps