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:
@@ -32,11 +32,7 @@
|
||||
<HoverableItem>
|
||||
{#snippet children(isHovered)}
|
||||
{#if item.disabled}
|
||||
<span
|
||||
{...props}
|
||||
aria-disabled="true"
|
||||
class="flex cursor-not-allowed items-center gap-2 opacity-50"
|
||||
>
|
||||
<span {...props} aria-disabled="true">
|
||||
{#if item.icon}
|
||||
{@const Icon = item.icon}
|
||||
<Icon {isHovered} size={16} class="custom" />
|
||||
@@ -71,11 +67,7 @@
|
||||
<HoverableItem>
|
||||
{#snippet children(isHovered)}
|
||||
{#if item.disabled}
|
||||
<span
|
||||
{...props}
|
||||
aria-disabled="true"
|
||||
class="flex cursor-not-allowed items-center gap-2 opacity-50"
|
||||
>
|
||||
<span {...props} aria-disabled="true">
|
||||
{#if item.icon}
|
||||
{@const Icon = item.icon}
|
||||
<Icon {isHovered} size={16} class="custom" />
|
||||
|
||||
Reference in New Issue
Block a user