From 624df2db242a8923f124ad0897b6718c4eb874d0 Mon Sep 17 00:00:00 2001 From: Marcus Feitoza Date: Sat, 18 Apr 2020 12:10:35 -0300 Subject: [PATCH 1/9] refactor(uishell): renaming variable --- .../UIShell/GlobalHeader/HeaderAction.svelte | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/UIShell/GlobalHeader/HeaderAction.svelte b/src/components/UIShell/GlobalHeader/HeaderAction.svelte index 737f0c08..d344aab5 100644 --- a/src/components/UIShell/GlobalHeader/HeaderAction.svelte +++ b/src/components/UIShell/GlobalHeader/HeaderAction.svelte @@ -1,7 +1,7 @@ -{#if story === 'with-nav'} - +{#if story === 'base'} +
+{:else if story === 'with-header-and-nav'} +
@@ -121,20 +123,29 @@ - -{:else if story === 'with-actions'} - +
+{:else if story === 'with-utilities'} +
-

Settings

+ + Settings +
- -

Notifications

+ + + Notifications + - +
+
+{:else if story === 'with-switcher'} +
+ + Switcher subject 1 Switecher item 1 @@ -147,27 +158,24 @@ - +
{:else if story === 'with-sidenav'} - - - - - - - - - - - - - - - - - - - -{:else} - +
+ + + + + + + + + + + + + + + + + {/if} diff --git a/src/components/UIShell/UIShell.stories.js b/src/components/UIShell/UIShell.stories.js index e8b66ea1..4cf5c5a3 100644 --- a/src/components/UIShell/UIShell.stories.js +++ b/src/components/UIShell/UIShell.stories.js @@ -3,27 +3,47 @@ import Component from './UIShell.Story.svelte'; export default { title: 'UIShell', decorators: [withKnobs] }; -export const WithNav = () => ({ +export const Base = () => ({ Component, props: { - story: 'with-nav', + story: 'base', href: text('The link href (href)', '#'), company: text('Company name', 'IBM'), platformName: text('Platform name', 'Platform Name') } }); -export const WithActions = () => ({ +export const WithHeaderAndNav = () => ({ Component, props: { - story: 'with-actions', + story: 'with-header-and-nav', href: text('The link href (href)', '#'), company: text('Company name', 'IBM'), platformName: text('Platform name', 'Platform Name') } }); -export const WithActionsAndSidenav = () => ({ +export const WithUtilities = () => ({ + Component, + props: { + story: 'with-utilities', + href: text('The link href (href)', '#'), + company: text('Company name', 'IBM'), + platformName: text('Platform name', 'Platform Name') + } +}); + +export const WithSwitcher = () => ({ + Component, + props: { + story: 'with-switcher', + href: text('The link href (href)', '#'), + company: text('Company name', 'IBM'), + platformName: text('Platform name', 'Platform Name') + } +}); + +export const WithSidenav = () => ({ Component, props: { story: 'with-sidenav', From 57e1dc65815ba355be14506b9eb85bd99f2f3728 Mon Sep 17 00:00:00 2001 From: Marcus Feitoza Date: Sat, 18 Apr 2020 12:46:24 -0300 Subject: [PATCH 4/9] refactor(uishell): remove unused element id --- src/components/UIShell/GlobalHeader/HeaderAction.svelte | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/UIShell/GlobalHeader/HeaderAction.svelte b/src/components/UIShell/GlobalHeader/HeaderAction.svelte index d344aab5..b20e513a 100644 --- a/src/components/UIShell/GlobalHeader/HeaderAction.svelte +++ b/src/components/UIShell/GlobalHeader/HeaderAction.svelte @@ -20,7 +20,7 @@ -
+
- From 9fd3b82dd64a07519d9569a01320c7babbc793d9 Mon Sep 17 00:00:00 2001 From: Marcus Feitoza Date: Sat, 18 Apr 2020 15:16:05 -0300 Subject: [PATCH 8/9] docs(uishell): bind variable --- src/components/UIShell/UIShell.Story.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/UIShell/UIShell.Story.svelte b/src/components/UIShell/UIShell.Story.svelte index b190615f..4c0c95ff 100644 --- a/src/components/UIShell/UIShell.Story.svelte +++ b/src/components/UIShell/UIShell.Story.svelte @@ -161,7 +161,7 @@
{:else if story === 'header-and-sidenav'}
- + From ee9f3e295c2c5f303812253160bbedb91d05d34b Mon Sep 17 00:00:00 2001 From: Marcus Feitoza Date: Sat, 18 Apr 2020 15:18:46 -0300 Subject: [PATCH 9/9] docs(uishell): add side nav story --- src/components/UIShell/UIShell.Story.svelte | 18 ++++++++++++++++++ src/components/UIShell/UIShell.stories.js | 10 ++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/components/UIShell/UIShell.Story.svelte b/src/components/UIShell/UIShell.Story.svelte index 4c0c95ff..b1b8947d 100644 --- a/src/components/UIShell/UIShell.Story.svelte +++ b/src/components/UIShell/UIShell.Story.svelte @@ -111,6 +111,24 @@ {#if story === 'header'}
+{:else if story === 'sidenav'} + + + + + + + + + + + + + + + + + {:else if story === 'header-with-nav'}
diff --git a/src/components/UIShell/UIShell.stories.js b/src/components/UIShell/UIShell.stories.js index 2a46d83c..5179d95a 100644 --- a/src/components/UIShell/UIShell.stories.js +++ b/src/components/UIShell/UIShell.stories.js @@ -13,6 +13,16 @@ export const Header = () => ({ } }); +export const Sidenav = () => ({ + Component, + props: { + story: 'sidenav', + href: text('The link href (href)', '#'), + company: text('Company name', 'IBM'), + platformName: text('Platform name', 'Platform Name') + } +}); + export const HeaderWithNav = () => ({ Component, props: {