chore: Use rose/dropdown comp in header nav comp

This commit is contained in:
Susmitha Girumala committed 2020-08-11 09:59:23 -04:00
1 parent 28c30d3244
commit 8836611b08
6 files changed
+31 -11

No files matched your search

@@ -18,7 +18,7 @@
)
);
.rose-header-utilities {
.rose-header-utilities, .rose-header-nav {
margin-right: sizing.rems(s);
.rose-dropdown-trigger {
@@ -1,6 +1,6 @@
<nav class="rose-header-nav">
{{yield (hash
link=(component 'link-to' class="rose-header-nav-link")
dropdown=(component 'rose/header/dropdown')
dropdown=(component 'rose/dropdown' style="light")
)}}
</nav>
@@ -1,6 +1,26 @@
<Rose::List::KeyValue as |list|>
<list.item as |item|>
<item.cell>Key</item.cell>
<item.cell>Value</item.cell>
</list.item>
</Rose::List::KeyValue>
<Rose::Header as |header|>
<header.brand @logo="logo" @text="Product Name" />
<header.nav as |nav|>
<nav.dropdown @text="org-name" as |dropdown|>
<dropdown.link @route="index">Menu item</dropdown.link>
<dropdown.link @route="about">Menu item</dropdown.link>
<dropdown.button>Button menu item</dropdown.button>
</nav.dropdown>
<nav.link @route="index">Section</nav.link>
<nav.link @route="about">Section</nav.link>
</header.nav>
<header.utilities as |utilities|>
<utilities.dropdown
@text="user@example.net"
@iconOnly={{true}}
@icon="user-square-fill" as |dropdown|
>
<dropdown.link @route="index">Menu item</dropdown.link>
<dropdown.link @route="about">Menu item</dropdown.link>
<dropdown.button>Button menu item</dropdown.button>
</utilities.dropdown>
</header.utilities>
</Rose::Header>
@@ -53,6 +53,6 @@ module('Integration | Component | rose/header', function (hooks) {
<utility.dropdown />
</header.utilities>
</Rose::Header>`);
assert.ok(find('.rose-header-dropdown'));
assert.ok(find('.rose-dropdown'));
});
});
@@ -24,6 +24,6 @@ module('Integration | Component | rose/header/nav', function (hooks) {
<nav.dropdown />
<nav.dropdown />
</Rose::Header::nav>`);
assert.equal(findAll('.rose-header-dropdown').length, 2);
assert.equal(findAll('.rose-dropdown').length, 2);
});
});
@@ -16,6 +16,6 @@ module('Integration | Component | rose/header/utilities', function (hooks) {
<nav.dropdown />
<nav.dropdown />
</Rose::Header::Utilities>`);
assert.equal(findAll('.rose-header-dropdown').length, 2);
assert.equal(findAll('.rose-dropdown').length, 2);
});
});