mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
* setup popover component template and basic story * add a11y features * add multiple positions for the popover * add stories for open right and left * prevent panel from hugging edges of screen * fix typo * add popover arrow depending on position * add buttons to stories * add figma preview * move toward directive approach * add all positions * add header input * add close functionality * make standalone component * add a11y import * add all stories * add story controls/args * add module of standalone components * gracefully handle text wrap and align close button to top for longer headings * update semantic html * add story for open state * use bitIconButton * adjust styles * add public close method * setup walkthrough mode * add walkthrough mode * revert to before walkthrough service added * add triggerRef to stories * change property name * add Escape key to close events * add initially open state * add docs * minor reformatting --------- Co-authored-by: William Martin <contact@willmartian.com>
19 lines
622 B
TypeScript
19 lines
622 B
TypeScript
import { A11yModule } from "@angular/cdk/a11y";
|
|
import { Component, EventEmitter, Input, Output, TemplateRef, ViewChild } from "@angular/core";
|
|
|
|
import { IconButtonModule } from "../icon-button/icon-button.module";
|
|
import { SharedModule } from "../shared/shared.module";
|
|
|
|
@Component({
|
|
standalone: true,
|
|
selector: "bit-popover",
|
|
imports: [A11yModule, IconButtonModule, SharedModule],
|
|
templateUrl: "./popover.component.html",
|
|
exportAs: "popoverComponent",
|
|
})
|
|
export class PopoverComponent {
|
|
@ViewChild(TemplateRef) templateRef: TemplateRef<any>;
|
|
@Input() title = "";
|
|
@Output() closed = new EventEmitter();
|
|
}
|