MCPcopy Create free account
hub / github.com/IABTechLab/uid2docs / CollapseButton

Function CollapseButton

src/theme/DocSidebarItem/Category/index.tsx:68–91  ·  view source on GitHub ↗
({
  categoryLabel,
  onClick,
}: {
  categoryLabel: string;
  onClick: ComponentProps<"button">["onClick"];
})

Source from the content-addressed store, hash-verified

66}
67
68function CollapseButton({
69 categoryLabel,
70 onClick,
71}: {
72 categoryLabel: string;
73 onClick: ComponentProps<"button">["onClick"];
74}) {
75 return (
76 <button
77 aria-label={translate(
78 {
79 id: "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",
80 message: "Toggle the collapsible sidebar category '{label}'",
81 description:
82 "The ARIA label to toggle the collapsible sidebar category",
83 },
84 { label: categoryLabel },
85 )}
86 type="button"
87 className="clean-btn menu__caret"
88 onClick={onClick}
89 />
90 );
91}
92
93export default function DocSidebarItemCategory({
94 item,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected