### File

`packages/ecl/components/ecl-site-header/login/ecl-site-header-login.component.ts`

### Description

Component for login/logout as part of the harmonised site header. Emits events when user logs in and when user opens the login dropdown.

### Extends

`ECLBaseDirective`

### Implements

`OnChanges` `OnDestroy`

### Metadata

HostDirectives | `ECLBaseDirective` `ECLClickOutsideDirective` Outputs : eclClickOutside
selector | `ecl-site-header-login`
imports | `TranslateModule` `EUI_ECL_ICON`
styles | `:host { display: block; }`
templateUrl | `./ecl-site-header-login.component.html`

### Index

###### Properties
class Public isLoginBoxActive Public loginArrowPosition loginLinkElement Readonly TABLET_BREAKPOINT
###### Methods
getLoginBoxCssClasses onClickOutsideMegaMenu onLoginBoxToggle onLoginClick getCssClasses
###### Inputs
isLoggedIn class e2eAttr tabindex
###### Outputs
login loginBoxToggle
###### HostBindings
class
###### HostListeners
eclClickOutside

### Constructor

`constructor()`

### Inputs

isLoggedIn
Type : `boolean`
Default value : `false`

class
Type : `string`

e2eAttr
Type : `any`

tabindex
Type : `number`

### Outputs

login
Type : `EventEmitter`

loginBoxToggle
Type : `EventEmitter`

### HostBindings

class
Type : `string`
Default value : `'ecl-site-header__login-container'`

### HostListeners

eclClickOutside
`eclClickOutside()`
Close the login popover on click outside.

### Methods

getLoginBoxCssClasses
`getLoginBoxCssClasses()`
Returns : `string` classes for the login popover.

onClickOutsideMegaMenu
`onClickOutsideMegaMenu()`
Decorators : `@HostListener('eclClickOutside')`
Close the login popover on click outside. Returns : `void`

onLoginBoxToggle
`onLoginBoxToggle(evt: MouseEvent)`
Parameters :
Name | Type | Optional
evt | `MouseEvent` | No
Returns : `void`

onLoginClick
`onLoginClick(evt: MouseEvent)`
Parameters :
Name | Type | Optional
evt | `MouseEvent` | No
Returns : `void`

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

### Properties

class
Type : `string`
Default value : `'ecl-site-header__login-container'`
Decorators : `@HostBinding('class')`

Public isLoginBoxActive
Type : `unknown`
Default value : `false`
If login popover is open (true) or closed (false).

Public loginArrowPosition
Type : `string`
The position of the arrow of the popover.

loginLinkElement
Type : `ElementRef<HTMLAnchorElement>`
Decorators : `@ViewChild('loginLink', {read: ElementRef})`

Readonly TABLET_BREAKPOINT
Type : `number`
Default value : `996`

# results matching ""

# No results matching ""