mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
refactor(SideNav): simplify collapsed logic
This commit is contained in:
parent
3049d2318c
commit
07ce05e344
1 changed files with 2 additions and 2 deletions
|
@ -53,7 +53,7 @@
|
|||
let winWidth = undefined;
|
||||
|
||||
$: isSideNavOpen =
|
||||
expandedByDefault && winWidth >= 1056 && persistentHamburgerMenu !== true;
|
||||
expandedByDefault && winWidth >= 1056 && !persistentHamburgerMenu;
|
||||
$: ariaLabel = company
|
||||
? `${company} `
|
||||
: "" + (uiShellAriaLabel || $$props["aria-label"] || platformName);
|
||||
|
@ -63,7 +63,7 @@
|
|||
|
||||
<header role="banner" aria-label="{ariaLabel}" class:bx--header="{true}">
|
||||
<slot name="skip-to-content" />
|
||||
{#if winWidth < 1056 || persistentHamburgerMenu === true}
|
||||
{#if winWidth < 1056 || persistentHamburgerMenu}
|
||||
<HamburgerMenu bind:isOpen="{isSideNavOpen}" />
|
||||
{/if}
|
||||
<a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue