### File

`packages/ecl/components/ecl-modal/ecl-modal-close.directive.ts`

### Description

Directive that allows an element to close the modal on click.

Can emit a result and indicate the role (e.g., confirm, cancel).

### Extends

`ECLBaseDirective`

### Metadata

Selector | `[eclModalClose]`

### Index

###### Methods
onClick getCssClasses
###### Inputs
eclModalClose eclModalRole class e2eAttr tabindex
###### Outputs
modalClose
###### HostListeners
click

### Inputs

eclModalClose
Type : `T`
Optional result value to emit when modal is closed.

eclModalRole
Type : `"confirm" | "cancel" | string`
Optional role associated with the modal close action (e.g., confirm, cancel).

class
Type : `string`

e2eAttr
Type : `any`

tabindex
Type : `number`

### Outputs

modalClose
Type : `EventEmitter`
Event emitted when the element is clicked and the modal should be closed.

### HostListeners

click
Arguments : `'$event'`
Handles click events and emits the `modalClose` event.

### Methods

onClick
`onClick(evt: MouseEvent)`
Decorators : `@HostListener('click', ['$event'])`
Handles click events and emits the `modalClose` event. Parameters :
Name | Type | Optional
evt | `MouseEvent` | No
Returns : `void`

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

# results matching ""

# No results matching ""