Skip to content

Commit

Permalink
Rename isActive props
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Sep 14, 2023
1 parent 4dcd6a7 commit 7c02820
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,31 +72,31 @@ function useCategoryHrefWithSSRFallback(
}

function CollapseButton({
isActive,
collapsed,
categoryLabel,
onClick,
}: {
isActive: boolean;
collapsed: boolean;
categoryLabel: string;
onClick: ComponentProps<'button'>['onClick'];
}) {
return (
<button
aria-label={
isActive
collapsed
? translate(
{
id: 'theme.DocSidebarItem.collapseCategoryAriaLabel',
message: "Collapse sidebar category '{label}'",
description: 'The ARIA label to collapse the sidebar category',
id: 'theme.DocSidebarItem.expandCategoryAriaLabel',
message: "Expand sidebar category '{label}'",
description: 'The ARIA label to expand the sidebar category',
},
{label: categoryLabel},
)
: translate(
{
id: 'theme.DocSidebarItem.expandCategoryAriaLabel',
message: "Expand sidebar category '{label}'",
description: 'The ARIA label to expand the sidebar category',
id: 'theme.DocSidebarItem.collapseCategoryAriaLabel',
message: "Collapse sidebar category '{label}'",
description: 'The ARIA label to collapse the sidebar category',
},
{label: categoryLabel},
)
Expand Down Expand Up @@ -200,7 +200,7 @@ export default function DocSidebarItemCategory({
</Link>
{href && collapsible && (
<CollapseButton
isActive={!collapsed}
collapsed={collapsed}
categoryLabel={label}
onClick={(e) => {
e.preventDefault();
Expand Down

0 comments on commit 7c02820

Please sign in to comment.