open-vault/ui/app/components/alert-popup.js
Angel Garbarino 178292f807
Glimmerize components using outer-html (#15744)
* alert-popup glimmerize:

* glimmerize block-error

* logo splash and wizard section

* remove template only

* pr comments
2022-06-02 14:40:17 -06:00

29 lines
903 B
JavaScript

import Component from '@glimmer/component';
/**
* @module AlertPopup
* The `AlertPopup` is an implementation of the [ember-cli-flash](https://github.com/poteto/ember-cli-flash) `flashMessage`.
*
* @example ```js
* // All properties are passed in from the flashMessage service.
* <AlertPopup @type={{message-types flash.type}} @message={{flash.message}} @close={{close}}/>```
*
* @param {string} type=null - The alert type. This comes from the message-types helper.
* @param {string} [message=null] - The alert message.
* @param {function} close=null - The close action which will close the alert.
* @param {boolean} isPreformatted - if true modifies class.
*
*/
export default class AlertPopup extends Component {
get type() {
return this.args.type || null;
}
get message() {
return this.args.message || null;
}
get close() {
return this.args.close || null;
}
}