Skip to content

Commit

Permalink
Rename Ui:Accordion to Ui::Disclosure
Browse files Browse the repository at this point in the history
- matches with DisclosureTriangle
  • Loading branch information
nummi committed Sep 19, 2019
1 parent d32b391 commit 047e1eb
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions app/templates/components/deprecation-item.hbs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Ui::Accordion as |accordion|>
<Ui::Disclosure as |disclosure|>
<div class="deprecation-item px-3" data-test="deprecation-item">
<div class="flex items-center">
<div
class="flex items-center flex-grow py-2"
{{on "click" accordion.toggle}}
{{on "click" disclosure.toggle}}
>
{{#if @model.hasSourceMap}}
<div class="flex-shrink-0 w-3">
<Ui::DisclosureTriangle @expanded={{accordion.isExpanded}} />
<Ui::DisclosureTriangle @expanded={{disclosure.isExpanded}} />
</div>
{{/if}}

Expand Down Expand Up @@ -47,7 +47,7 @@
{{/if}}
</div>

{{#if (and @model.hasSourceMap accordion.isExpanded)}}
{{#if (and @model.hasSourceMap disclosure.isExpanded)}}
{{#each @model.sources as |single|}}
<DeprecationItemSource @model={{single}} as |source|>
<div class="deprecation-source pb-2" data-test="deprecation-source">
Expand Down Expand Up @@ -81,4 +81,4 @@
{{/each}}
{{/if}}
</div>
</Ui::Accordion>
</Ui::Disclosure>
10 changes: 5 additions & 5 deletions app/templates/components/render-item.hbs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Ui::Accordion as |accordion|>
<Ui::Disclosure as |disclosure|>
<tr
style={{this.nodeStyle}}
class="list__row js-render-profile-item"
>
{{#list.cell
class="list__cell_main js-render-main-cell"
on-click=accordion.toggle
on-click=disclosure.toggle
style=this.nameStyle
}}
{{#if this.hasChildren}}
<Ui::DisclosureTriangle @expanded={{accordion.isExpanded}} />
<Ui::DisclosureTriangle @expanded={{disclosure.isExpanded}} />
{{/if}}

<span title={{@model.name}}>
Expand All @@ -28,7 +28,7 @@
{{/list.cell}}
</tr>

{{#if accordion.isExpanded}}
{{#if disclosure.isExpanded}}
{{#each @model.children as |child|}}
<RenderItem
@model={{child}}
Expand All @@ -38,4 +38,4 @@
/>
{{/each}}
{{/if}}
</Ui::Accordion>
</Ui::Disclosure>
File renamed without changes.
1 change: 0 additions & 1 deletion lib/ui/app/components/ui/accordion.js

This file was deleted.

1 change: 1 addition & 0 deletions lib/ui/app/components/ui/disclosure.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from 'ui/components/disclosure';

0 comments on commit 047e1eb

Please sign in to comment.