feat(ui-shell): add Close/AppSwitcher as default HeaderAction icons

This commit is contained in:
Eric Liu 2020-09-04 17:05:55 -07:00
commit 5f62cdeb82
2 changed files with 4 additions and 3 deletions

View file

@ -24,9 +24,11 @@
*/
export let ref = null;
import { Icon } from "../../Icon";
import { createEventDispatcher } from "svelte";
import { slide } from "svelte/transition";
import Close20 from "carbon-icons-svelte/lib/Close20";
import AppSwitcher20 from "carbon-icons-svelte/lib/AppSwitcher20";
import { Icon } from "../../Icon";
const dispatch = createEventDispatcher();
@ -70,7 +72,7 @@
isOpen = !isOpen;
dispatch(isOpen ? 'open' : 'close');
}}">
<Icon {...icon} />
<Icon render="{isOpen ? Close20 : AppSwitcher20}" {...icon} />
<slot name="text">
{#if text}<span>{text}</span>{/if}
</slot>

View file

@ -193,7 +193,6 @@
<HeaderUtilities>
<HeaderAction
type="Switcher"
icon="{isOpen ? iAccount : iSwitcher}"
bind:isOpen
on:open="{() => {
console.log('on:open');