fix(sidebar): restore menu button styles on disabled nav items (#692)

Disabled items were overriding props.class with a custom class string,
stripping the Sidebar.MenuButton's height, padding, and color styles.
Drop the inline class and rely on the existing aria-disabled CSS rules.
This commit is contained in:
Rotimi Best
2026-06-25 23:54:47 +01:00
committed by GitHub
parent 4fe45ac642
commit e43d8a2444
@@ -32,11 +32,7 @@
<HoverableItem> <HoverableItem>
{#snippet children(isHovered)} {#snippet children(isHovered)}
{#if item.disabled} {#if item.disabled}
<span <span {...props} aria-disabled="true">
{...props}
aria-disabled="true"
class="flex cursor-not-allowed items-center gap-2 opacity-50"
>
{#if item.icon} {#if item.icon}
{@const Icon = item.icon} {@const Icon = item.icon}
<Icon {isHovered} size={16} class="custom" /> <Icon {isHovered} size={16} class="custom" />
@@ -71,11 +67,7 @@
<HoverableItem> <HoverableItem>
{#snippet children(isHovered)} {#snippet children(isHovered)}
{#if item.disabled} {#if item.disabled}
<span <span {...props} aria-disabled="true">
{...props}
aria-disabled="true"
class="flex cursor-not-allowed items-center gap-2 opacity-50"
>
{#if item.icon} {#if item.icon}
{@const Icon = item.icon} {@const Icon = item.icon}
<Icon {isHovered} size={16} class="custom" /> <Icon {isHovered} size={16} class="custom" />