mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
hamburger menu working
This commit is contained in:
parent
7e168adcb7
commit
2746249d98
3 changed files with 33 additions and 20 deletions
|
@ -1,13 +1,13 @@
|
|||
<script>
|
||||
export let ariaLabel = undefined;
|
||||
export let isOpen = false;
|
||||
|
||||
import { cx } from '../../../lib';
|
||||
import Menu20 from 'carbon-icons-svelte/lib/Menu20';
|
||||
import Icon from '../../Icon/Icon.svelte';
|
||||
import { fly } from "svelte/transition";
|
||||
import { closeIcon } from '../constants';
|
||||
|
||||
let isOpen = false;
|
||||
|
||||
$: iconProps = !isOpen ? {
|
||||
class: undefined,
|
||||
skeleton: false,
|
||||
|
@ -20,6 +20,7 @@
|
|||
</script>
|
||||
|
||||
<button
|
||||
transition:fly={{ x: -200, delay: 50, duration: 250 }}
|
||||
aria-label={ariaLabel}
|
||||
class={cx('--header__action', '--header__menu-trigger', '--header__menu-toggle')}
|
||||
title="Open menu"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue