-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaccordion.hbs
54 lines (54 loc) · 1.32 KB
/
accordion.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<div class="au-c-accordion {{this.skin}} {{this.reverse}}" ...attributes>
<AuToolbar
@nowrap={{true}}
@reverse={{@reverse}}
{{on "click" this.toggleAccordion}}
data-test-accordion-toggle
as |Group|
>
<Group>
<div>
<AuButton
@skin="link"
aria-expanded="{{if this.isOpen 'true' 'false'}}"
data-test-accordion-button
>
{{@buttonLabel}}
</AuButton>
{{#if @subtitle}}
<p data-test-accordion-subtitle>
{{@subtitle}}
</p>
{{/if}}
</div>
</Group>
<Group>
{{#if this.isOpen}}
<AuIcon
@icon={{this.iconOpen}}
@alignment="left"
@size="large"
@ariaHidden={{true}}
data-test-accordion-icon-open={{this.iconOpen}}
/>
{{else}}
<AuIcon
@icon={{this.iconClosed}}
@alignment="left"
@size="large"
@ariaHidden={{true}}
data-test-accordion-icon-closed={{this.iconClosed}}
/>
{{/if}}
</Group>
</AuToolbar>
{{#if this.isOpen}}
<AuContent tabindex="0" data-test-accordion-content>
{{#if this.loading}}
<AuLoader data-test-accordion-loader @hideMessage={{true}} />
{{else}}
{{yield}}
{{/if}}
</AuContent>
{{/if}}
</div>