in src/theme/DocSidebarItem/Category/index.tsx [74:109]
function CollapseButton({
collapsed,
categoryLabel,
onClick,
}: {
collapsed: boolean;
categoryLabel: string;
onClick: ComponentProps<'button'>['onClick'];
}) {
return (
<button
aria-label={
collapsed
? translate(
{
id: 'theme.DocSidebarItem.expandCategoryAriaLabel',
message: "Expand sidebar category '{label}'",
description: 'The ARIA label to expand the sidebar category',
},
{label: categoryLabel},
)
: translate(
{
id: 'theme.DocSidebarItem.collapseCategoryAriaLabel',
message: "Collapse sidebar category '{label}'",
description: 'The ARIA label to collapse the sidebar category',
},
{label: categoryLabel},
)
}
type="button"
className="clean-btn menu__caret"
onClick={onClick}
/>
);
}