Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 55 56 57 58 59 60 61 | 3x 3x 3x | import defaultProp from '@freshworks/core/utils/default-decorator';
import { layout as templateLayout } from '@ember-decorators/component';
import { inject } from '@ember/service';
import Component from '@ember/component';
import layout from '../templates/components/nucleus-toast-message';
import { ICON_MAP, VARIANT_MAP } from '../constants/nucleus-toast-message';
/**
__Usage:__
[Refer component page](/docs/components/nucleus-toast-message)
@class Nucleus Toast Message
@namespace Components
@extends Ember.Component
@public
*/
@templateLayout(layout)
class NucleusToastMessage extends Component {
/**
* Queue service which manages the toast messages.
* More info [here](https://github.com/poteto/ember-cli-flash#custom-messages-api)
*
* @field flashMessages
* @type function
* @public
*/
@inject()
flashMessages;
/**
* Controls the positioning of the toast messages.
* `(top|bottom) (left|right|center)`
*
* @field position
* @type string
* @public
*/
@defaultProp
position = 'top center';
/**
* Mapper to get the icon name from flashmessage.type
*
* @field _iconMap
* @type string
* @private
*/
_iconMap = ICON_MAP;
/**
* Mapper to get the icon variant from flashmessage.type
*
* @field _variantMap
* @type string
* @private
*/
_variantMap = VARIANT_MAP;
}
export default NucleusToastMessage;
|