File

packages/ecl/components/ecl-modal/ecl-modal-header.component.ts

Description

Header component used within the ECL Modal.

Displays an icon depending on the modal variant, user-defined content, and a close button that emits a close event.

Extends

ECLBaseDirective

Metadata

Index

Properties
Methods
Inputs
Outputs
HostBindings
Accessors

Constructor

constructor(eclThemeService: EclThemeService)

Constructs the modal header component with injected theme service.

Parameters :
Name Type Optional Description
eclThemeService EclThemeService No

The theme service used to determine current theme settings.

Inputs

variant
Type : "information" | "success" | "warning" | "error" | string

Defines the visual variant of the modal.

Determines which icon is shown in the header.

Possible values:

  • 'information'
  • 'success'
  • 'warning'
  • 'error'
  • any other custom string (no icon will be shown)
class
Type : string
e2eAttr
Type : any
tabindex
Type : number

Outputs

modalClose
Type : EventEmitter

Event emitted when the close button is clicked.

Emits an EclModalCloseEvent object.

HostBindings

class
Type : string

Methods

getIcon
getIcon()

Returns the name of the icon associated with the current variant.

Returns : "information" | "check-filled" | "warning" | "error" | null

The icon name, or null if no matching variant exists.

onCloseClick
onCloseClick()

Handles the click event on the close button.

Emits a modalClose event with no payload.

Returns : void
getCssClasses
getCssClasses(rootClass: string)
Parameters :
Name Type Optional
rootClass string No
Returns : string

Properties

closeButton
Type : EclButtonComponent
Decorators :
@ViewChild('closeButton')

Applies the ECL CSS class for modal header container.

Public eclThemeService
Type : EclThemeService
The theme service used to determine current theme settings.

Accessors

cssClasses
getcssClasses()

results matching ""

    No results matching ""