mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
Align v10.34 (#621)
* feat(theme): add g80 theme * docs(data-table): use link with icon variant * feat(search): support expandable variant * fix(file-uploaded): use semantic p element instead of strong * feat(side-nav): dispatch open, close, click:overlay events * refactor(ui-shell): remove usage of deprecated Icon component * feat(ui-shell): allow custom hamburger menu icons * feat(button): support xl size * fix(code-snippet): wrap code element with pre * refactor(button): use button specific tooltip class for icon-only variant * feat(password-input): support warning, inline props * feat(data-table): support medium size
This commit is contained in:
parent
630e19b57a
commit
f9909827d0
36 changed files with 572 additions and 197 deletions
|
@ -35,6 +35,22 @@
|
|||
/** Obtain a reference to the HTML anchor element */
|
||||
export let ref = null;
|
||||
|
||||
/**
|
||||
* Specify the icon from `carbon-icons-svelte` to render for the closed state
|
||||
* Defaults to `Menu20`
|
||||
* @type {typeof import("carbon-icons-svelte").CarbonIcon}
|
||||
*/
|
||||
export let iconMenu = Menu20;
|
||||
|
||||
/**
|
||||
* Specify the icon from `carbon-icons-svelte` to render for the opened state
|
||||
* Defaults to `Close20`
|
||||
* @type {typeof import("carbon-icons-svelte").CarbonIcon}
|
||||
*/
|
||||
export let iconClose = Close20;
|
||||
|
||||
import Close20 from "carbon-icons-svelte/lib/Close20/Close20.svelte";
|
||||
import Menu20 from "carbon-icons-svelte/lib/Menu20/Menu20.svelte";
|
||||
import { shouldRenderHamburgerMenu } from "../navStore";
|
||||
import HamburgerMenu from "../SideNav/HamburgerMenu.svelte";
|
||||
|
||||
|
@ -52,7 +68,11 @@
|
|||
<header role="banner" aria-label="{ariaLabel}" class:bx--header="{true}">
|
||||
<slot name="skip-to-content" />
|
||||
{#if ($shouldRenderHamburgerMenu && winWidth < 1056) || persistentHamburgerMenu}
|
||||
<HamburgerMenu bind:isOpen="{isSideNavOpen}" />
|
||||
<HamburgerMenu
|
||||
bind:isOpen="{isSideNavOpen}"
|
||||
iconClose="{iconClose}"
|
||||
iconMenu="{iconMenu}"
|
||||
/>
|
||||
{/if}
|
||||
<a
|
||||
href="{href}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue