chore: Rename dropdown alignRight attribute to: dropdownRight
Remove unused `light` style dropdown def
This commit is contained in:
6 files changed
+8
-5
No files matched your search
@@ -2,6 +2,9 @@ import Component from '@ember/component';
|
||||
import layout from '../../templates/components/rose/dropdown';
|
||||
import { action } from '@ember/object';
|
||||
|
||||
/**
|
||||
* A dropdown component composed of HTML disclosure elements: details and summary
|
||||
*/
|
||||
export default Component.extend({
|
||||
// =attributes
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ A simple dropdown component with support for links and buttons.
|
||||
Dropdown content can be aligned to right edge of the component instead of the default left edge, which is the default setting. The following example floats the component to right edge of the page inorder to provide enough space to display right aligned dropdown content.
|
||||
|
||||
```htmlbars
|
||||
<Rose::Dropdown @text="Choose One…" style="float: right" @alignRight={{true}} as |dropdown|>
|
||||
<Rose::Dropdown @text="Choose One…" style="float: right" @dropdownRight={{true}} 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>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<details
|
||||
...attributes
|
||||
class="rose-dropdown {{if @alignRight " rose-dropdown-right"}}"
|
||||
class="rose-dropdown {{if @dropdownRight " rose-dropdown-right"}}"
|
||||
{{on-click-outside this.close}}
|
||||
>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<nav class="rose-header-nav">
|
||||
{{yield (hash
|
||||
link=(component 'link-to' class="rose-header-nav-link")
|
||||
dropdown=(component 'rose/dropdown' style="light")
|
||||
dropdown=(component 'rose/dropdown')
|
||||
)}}
|
||||
</nav>
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="rose-header-utilities">
|
||||
{{yield (hash
|
||||
dropdown=(component 'rose/dropdown' alignRight=true)
|
||||
dropdown=(component 'rose/dropdown' dropdownRight=true)
|
||||
)}}
|
||||
</div>
|
||||
@@ -35,7 +35,7 @@ module('Integration | Component | rose/dropdown', function (hooks) {
|
||||
|
||||
test('it supports right aligned content', async function (assert) {
|
||||
await render(hbs`
|
||||
<Rose::Dropdown @alignRight={{true}} />
|
||||
<Rose::Dropdown @dropdownRight={{true}} />
|
||||
`);
|
||||
assert.ok(find('.rose-dropdown-right'));
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user