mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
Make UI Shell HeaderAction panel transition configurable (#419)
* fix(ui-shell): remove fly transition from hamburger menu * feat(header-action): make panel transition configurable * chore: rebuild types, docs * docs(ui-shell): document transition prop in Header app switcher example
This commit is contained in:
parent
1e72ea9942
commit
f4c940d5ee
31 changed files with 244 additions and 160 deletions
|
@ -11,22 +11,20 @@
|
|||
/** Obtain a reference to the HTML button element */
|
||||
export let ref = null;
|
||||
|
||||
import { fly } from "svelte/transition";
|
||||
import Close20 from "carbon-icons-svelte/lib/Close20";
|
||||
import Menu20 from "carbon-icons-svelte/lib/Menu20";
|
||||
import { Icon } from "../../Icon";
|
||||
</script>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
bind:this="{ref}"
|
||||
type="button"
|
||||
title="Open menu"
|
||||
aria-label="{ariaLabel}"
|
||||
class:bx--header__action="{true}"
|
||||
class:bx--header__menu-trigger="{true}"
|
||||
class:bx--header__menu-toggle="{true}"
|
||||
{...$$restProps}
|
||||
transition:fly="{{ x: -200, delay: 50, duration: 250 }}"
|
||||
on:click
|
||||
on:click="{() => (isOpen = !isOpen)}"
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue