### File

`packages/eui/packages/components-next/src/lib/components/eui-message-box/eui-message-box.component.ts`

### Implements

`AfterViewInit` `OnDestroy`

### Metadata

changeDetection | `ChangeDetectionStrategy.OnPush`
encapsulation | `ViewEncapsulation.None`
selector | `eui-message-box`
styleUrls | `./styles/_index.scss`
templateUrl | `./eui-message-box.component.html`

### Index

###### Properties

- _closeOnClickOutside
- _hasCloseButton
- Public content
- euiMessageBoxFooterDirective
- templateRefContent
- templateRefFooter

###### Methods

- Public closeMessageBox
- Public openMessageBox

###### Inputs

- acceptLabel
- closeOnClickOutside
- dismissLabel
- e2eAttr
- hasCloseButton
- title
- type

###### Outputs

- accept
- close
- dismiss
- open
- outsideClick

###### Accessors

- hasCloseButton
- closeOnClickOutside

### Constructor

`constructor(viewContainerRef: ViewContainerRef, euiMessageBoxService: EuiMessageBoxService)`

Parameters :

Name | Type | Optional
viewContainerRef | `ViewContainerRef` | No
euiMessageBoxService | `EuiMessageBoxService` | No

### Inputs

acceptLabel
Type : `string`
Default value : `'eui.YES'`

closeOnClickOutside

dismissLabel
Type : `string`
Default value : `'eui.NO'`

e2eAttr
Type : `string`
Default value : `'eui-message-box'`

hasCloseButton

title
Type : `string`

type
Default value : `'warning'`

### Outputs

accept
Type : `EventEmitter`

close
Type : `EventEmitter`

dismiss
Type : `EventEmitter`

open
Type : `EventEmitter`

outsideClick
Type : `EventEmitter`

### Methods

Public closeMessageBox
`closeMessageBox()`
Close a Message Box Returns : `void`

Public openMessageBox
`openMessageBox()`
Open a Message Box Returns : `void`

### Properties

_closeOnClickOutside
Default value : `false`

_hasCloseButton
Default value : `true`

Public content
Type : `string | TemplatePortal`

euiMessageBoxFooterDirective
Type : `QueryList<EuiMessageBoxFooterDirective>`
Decorators : `@ContentChild(undefined)`

templateRefContent
Type : `TemplateRef<ElementRef>`
Decorators : `@ViewChild('templateRefContent')`

templateRefFooter
Type : `TemplateRef<EuiMessageBoxFooterDirective>`
Decorators : `@ViewChild('templateRefFooter')`

### Accessors

hasCloseButton
set `hasCloseButton(value)`

Parameters :

Name | Optional
value | No

Returns : `void`

closeOnClickOutside
set `closeOnClickOutside(value)`

Parameters :

Name | Optional
value | No

Returns : `void`

# result-matching ""

# No results matching ""