mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
breaking(ui-shell): remove GlobalHeader, SideNav folders (#1223)
* breaking(ui-shell): remove GlobalHeader/SideNav folders * Run "yarn build:docs"
This commit is contained in:
parent
d34f571150
commit
62735d6275
34 changed files with 56 additions and 56 deletions
|
@ -1,45 +0,0 @@
|
|||
<script>
|
||||
/**
|
||||
* Specify the ARIA label for the button
|
||||
* @type {string}
|
||||
*/
|
||||
export let ariaLabel = undefined;
|
||||
|
||||
/** Set to `true` to toggle the open state */
|
||||
export let isOpen = false;
|
||||
|
||||
/**
|
||||
* Specify the icon to render for the closed state
|
||||
* Defaults to `Menu20`
|
||||
* @type {typeof import("svelte").SvelteComponent}
|
||||
*/
|
||||
export let iconMenu = Menu20;
|
||||
|
||||
/**
|
||||
* Specify the icon to render for the opened state
|
||||
* Defaults to `Close20`
|
||||
* @type {typeof import("svelte").SvelteComponent}
|
||||
*/
|
||||
export let iconClose = Close20;
|
||||
|
||||
/** Obtain a reference to the HTML button element */
|
||||
export let ref = null;
|
||||
|
||||
import Close20 from "../../icons/Close20.svelte";
|
||||
import Menu20 from "../../icons/Menu20.svelte";
|
||||
</script>
|
||||
|
||||
<button
|
||||
bind:this="{ref}"
|
||||
type="button"
|
||||
title="{ariaLabel}"
|
||||
aria-label="{ariaLabel}"
|
||||
class:bx--header__action="{true}"
|
||||
class:bx--header__menu-trigger="{true}"
|
||||
class:bx--header__menu-toggle="{true}"
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:click="{() => (isOpen = !isOpen)}"
|
||||
>
|
||||
<svelte:component this="{isOpen ? iconClose : iconMenu}" />
|
||||
</button>
|
Loading…
Add table
Add a link
Reference in a new issue