ui: ConsulLoader component (#7719)

Moves the `consul-loader` partial to a template-only component
This commit is contained in:
John Cowen 2020-04-29 09:10:50 +01:00 committed by John Cowen
parent 9795c8c2cd
commit f8d920d9ef
5 changed files with 23 additions and 3 deletions

View File

@ -70,7 +70,7 @@
{{/if}} {{/if}}
<div> <div>
{{#if loading}} {{#if loading}}
{{partial 'consul-loading'}} <ConsulLoader />
{{else}} {{else}}
{{#if (not enabled) }} {{#if (not enabled) }}
<YieldSlot @name="disabled">{{yield}}</YieldSlot> <YieldSlot @name="disabled">{{yield}}</YieldSlot>

View File

@ -0,0 +1,16 @@
## ConsulLoader
`<ConsulLoader />`
Simple template-only component to show the circulr animated Consul loader animation.
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
### See
- [Component Source Code](./index.js)
- [Template Source Code](./index.hbs)
---

View File

@ -51,4 +51,3 @@
<circle r="9" cx="22" cy="22" style="transform-origin: 22px 22px" /> <circle r="9" cx="22" cy="22" style="transform-origin: 22px 22px" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,5 @@
import Component from '@ember/component';
export default Component.extend({
tagName: '',
});

View File

@ -7,7 +7,7 @@
{{else}} {{else}}
<AppView @class="loading show"> <AppView @class="loading show">
<BlockSlot @name="content"> <BlockSlot @name="content">
{{partial 'consul-loading'}} <ConsulLoader />
</BlockSlot> </BlockSlot>
</AppView> </AppView>
{{/if}} {{/if}}