fix(sidebar): restore menu button styles on disabled nav items
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>
|
<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" />
|
||||||
|
|||||||
Reference in New Issue
Block a user