Skip to content

Commit

Permalink
feat(ui-shell): add Close/AppSwitcher as default HeaderAction icons
Browse files Browse the repository at this point in the history
metonym committed Sep 5, 2020
1 parent 4b7d254 commit 5f62cde
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/UIShell/GlobalHeader/HeaderAction.svelte
Original file line number Diff line number Diff line change
@@ -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>
1 change: 0 additions & 1 deletion src/UIShell/UIShell.Story.svelte
Original file line number Diff line number Diff line change
@@ -193,7 +193,6 @@
<HeaderUtilities>
<HeaderAction
type="Switcher"
icon="{isOpen ? iAccount : iSwitcher}"
bind:isOpen
on:open="{() => {
console.log('on:open');

0 comments on commit 5f62cde

Please sign in to comment.