05f6b0ae97
* updates dropdown transform codemod to apply @defaultClass arg to Content component * runs codemod and transforms class to @defaultClass on basic dropdown Content component * adds changelog entry * removes changelog entry
54 lines
1.7 KiB
Handlebars
54 lines
1.7 KiB
Handlebars
<BasicDropdown @class="popup-menu" @horizontalPosition="auto-right" @verticalPosition="below" as |D|>
|
|
<D.Trigger
|
|
data-test-popup-menu-trigger="true"
|
|
class={{concat "toolbar-link" (if D.isOpen " is-active")}}
|
|
@htmlTag="button"
|
|
>
|
|
{{or this.startMonth "Month"}}
|
|
<Chevron @direction="down" @isButton={{true}} />
|
|
</D.Trigger>
|
|
<D.Content @defaultClass="popup-menu-content is-wide">
|
|
<nav class="box menu scroll">
|
|
<ul class="menu-list">
|
|
{{#each this.months as |month|}}
|
|
<button
|
|
type="button"
|
|
class="link"
|
|
{{on "click" (queue (fn this.selectStartMonth month) (action D.actions.close))}}
|
|
>
|
|
{{month}}
|
|
</button>
|
|
{{/each}}
|
|
</ul>
|
|
</nav>
|
|
</D.Content>
|
|
</BasicDropdown>
|
|
<BasicDropdown @class="popup-menu" @horizontalPosition="auto-right" @verticalPosition="below" as |D|>
|
|
<D.Trigger
|
|
data-test-popup-menu-trigger="true"
|
|
class={{concat "toolbar-link" (if D.isOpen " is-active")}}
|
|
@htmlTag="button"
|
|
>
|
|
{{or this.startYear "Year"}}
|
|
<Chevron @direction="down" @isButton={{true}} />
|
|
</D.Trigger>
|
|
<D.Content @defaultClass="popup-menu-content is-wide">
|
|
<nav class="box menu">
|
|
<ul class="menu-list">
|
|
{{#each this.years as |year|}}
|
|
<button type="button" class="link" {{on "click" (queue (fn this.selectStartYear year) (action D.actions.close))}}>
|
|
{{year}}
|
|
</button>
|
|
{{/each}}
|
|
</ul>
|
|
</nav>
|
|
</D.Content>
|
|
</BasicDropdown>
|
|
<button
|
|
type="button"
|
|
class="button is-primary"
|
|
disabled={{if (and this.startMonth this.startYear) false true}}
|
|
{{on "click" this.saveDateSelection}}
|
|
>
|
|
Save
|
|
</button> |