feat(user-dropdown): implement user dropdown component with authentication actions and integrate with store header
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
[disabled]="disabled()"
|
||||
[ngClass]="buttonClasses()"
|
||||
[attr.aria-label]="ariaLabel() || variant()"
|
||||
[attr.aria-expanded]="ariaExpanded()"
|
||||
[attr.aria-controls]="ariaControls()"
|
||||
(click)="clicked.emit($event)"
|
||||
>
|
||||
<i [ngClass]="iconClass()"></i>
|
||||
</button>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
||||
import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';
|
||||
import { NgClass } from '@angular/common';
|
||||
|
||||
export type IconButtonVariant =
|
||||
@@ -21,6 +21,9 @@ export class IconButtonComponent {
|
||||
readonly variant = input.required<IconButtonVariant>();
|
||||
readonly disabled = input(false);
|
||||
readonly ariaLabel = input<string>('');
|
||||
readonly ariaExpanded = input<boolean | null>(null);
|
||||
readonly ariaControls = input<string | null>(null);
|
||||
readonly clicked = output<MouseEvent>();
|
||||
|
||||
protected readonly iconClass = computed(() => {
|
||||
const classes: Record<IconButtonVariant, string> = {
|
||||
|
||||
Reference in New Issue
Block a user