open-vault/ui/lib/core/addon/components/alert-inline.hbs
claire bontempo d4f3fba56e
UI/Fix form validation issues (#15560)
* clean up validators

* fix getter overriding user input

* add changelog

* remove asString option

* move invalid check up

* remove asString everywhere

* revert input value defaults

* undo form disabling if validation errors

* address comments

* remove or

* add validation message to form, create pseudo loading icon

* whole alert disappears with refresh

* glimmerize alert-inline

* add tests

* rename variables for consistency

* spread attributes to glimmerized component

* address comments

* add validation test
2022-05-25 11:22:36 -07:00

19 lines
519 B
Handlebars

<div
{{did-update this.refresh @message}}
class={{concat "message-inline" this.paddingTop this.isMarginless this.sizeSmall}}
data-test-inline-alert
...attributes
>
{{#if this.isRefreshing}}
<Icon @name="loading" class="loading" />
{{else}}
<Icon @name={{this.alertType.glyph}} class={{this.alertType.glyphClass}} />
<p class={{this.textClass}} data-test-inline-error-message>
{{#if (has-block)}}
{{yield}}
{{else}}
{{@message}}
{{/if}}
</p>
{{/if}}
</div>