File

feature-libs/organization/administration/components/shared/message/notification/notification-message.component.ts

Extends

BaseMessageComponent

Metadata

changeDetection ChangeDetectionStrategy.OnPush
selector cx-org-notification
templateUrl ./notification-message.component.html

Index

Properties
Methods
HostBindings

HostBindings

class
Type : string
Inherited from BaseMessageComponent
class.terminated
Type : boolean
Default value : false
Inherited from BaseMessageComponent

Methods

close
close()
Inherited from BaseMessageComponent
Returns : void
Protected handleAutoHide
handleAutoHide()
Inherited from BaseMessageComponent
Returns : void
ngOnInit
ngOnInit()
Inherited from BaseMessageComponent
Returns : void
Protected resolveType
resolveType()
Inherited from BaseMessageComponent
Returns : string

Properties

closeIcon
Default value : ICON_TYPE.CLOSE
message
Type : Translatable
Inherited from BaseMessageComponent
messageIcon
Type : ICON_TYPE
Inherited from BaseMessageComponent

Icon used to display next to the message.

Optional messageTitle
Type : Translatable
Inherited from BaseMessageComponent
terminated
Default value : false
Decorators :
@HostBinding('class.terminated')
Inherited from BaseMessageComponent
type
Type : string
Decorators :
@HostBinding('class')
Inherited from BaseMessageComponent
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { ICON_TYPE } from '@spartacus/storefront';
import { BaseMessageComponent } from '../base-message.component';

@Component({
  selector: 'cx-org-notification',
  templateUrl: './notification-message.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class NotificationMessageComponent extends BaseMessageComponent {
  closeIcon = ICON_TYPE.CLOSE;
}
<div
  class="inner"
  [cxFocus]="{ autofocus: true, focusOnEscape: true }"
  (esc)="close()"
>
  <cx-icon *ngIf="messageIcon" [type]="messageIcon"></cx-icon>
  <p>{{ message | cxTranslate }}</p>
  <button class="close" (click)="close()" type="button">
    <cx-icon [type]="closeIcon"></cx-icon>
  </button>
</div>
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""