mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
Merge branch 'master' into rewrite-tyepscript-definitions
This commit is contained in:
commit
56718c633d
6 changed files with 81 additions and 5 deletions
|
@ -29,6 +29,9 @@
|
|||
*/
|
||||
export let platformName = "";
|
||||
|
||||
/** Set to `true` to persist the hamburger menu */
|
||||
export let persistentHamburgerMenu = false;
|
||||
|
||||
/** Obtain a reference to the HTML anchor element */
|
||||
export let ref = null;
|
||||
|
||||
|
@ -36,7 +39,8 @@
|
|||
|
||||
let winWidth = undefined;
|
||||
|
||||
$: isSideNavOpen = expandedByDefault && winWidth >= 1056;
|
||||
$: isSideNavOpen =
|
||||
expandedByDefault && winWidth >= 1056 && !persistentHamburgerMenu;
|
||||
$: ariaLabel = company
|
||||
? `${company} `
|
||||
: "" + (uiShellAriaLabel || $$props["aria-label"] || platformName);
|
||||
|
@ -46,7 +50,7 @@
|
|||
|
||||
<header role="banner" aria-label="{ariaLabel}" class:bx--header="{true}">
|
||||
<slot name="skip-to-content" />
|
||||
{#if winWidth < 1056}
|
||||
{#if winWidth < 1056 || persistentHamburgerMenu}
|
||||
<HamburgerMenu bind:isOpen="{isSideNavOpen}" />
|
||||
{/if}
|
||||
<a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue