Skip to content

Commit

Permalink
UI - add wormhole div for ember-basic-dropdown (#6760)
Browse files Browse the repository at this point in the history
* add wormhole div for ember-basic-dropdown

* add content to the PopupMenu story
  • Loading branch information
meirish authored May 20, 2019
1 parent c365b07 commit c23c50b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ui/.storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ addDecorator(storyFn => {
assign(element.style, styles.style);

const innerElement = document.createElement('div');
const wormhole = document.createElement('div');
wormhole.setAttribute('id', 'ember-basic-dropdown-wormhole');
innerElement.appendChild(wormhole);

element.appendChild(innerElement);
innerElement.appendTo = function appendTo(el) {
Expand Down
12 changes: 11 additions & 1 deletion ui/stories/popup-menu.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ storiesOf('PopupMenu/', module)
.add(`PopupMenu`, () => ({
template: hbs`
<h5 class="title is-5">Popup Menu</h5>
<PopupMenu/>
<PopupMenu>
<nav class="menu">
<ul class="menu-list">
<li class="action">
<button type="button" class="button link">
Popup content goes here!
</button>
</li>
</ul>
</nav>
</PopupMenu>
`,
context: {},
}),
Expand Down

0 comments on commit c23c50b

Please sign in to comment.