1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 15:23:33 +00:00

[SM-303] feat: add fadeIn animation to bit-dialog (#4309)

This commit is contained in:
Will Martin
2023-01-11 10:47:43 -05:00
committed by GitHub
parent 4be2989fec
commit 794f1193db
5 changed files with 19 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
<div
class="tw-my-4 tw-flex tw-max-h-screen tw-w-96 tw-max-w-90vw tw-flex-col tw-overflow-hidden tw-rounded tw-border tw-border-solid tw-border-secondary-300 tw-bg-text-contrast tw-text-main"
@fadeIn
>
<div class="tw-flex tw-flex-col tw-items-center tw-gap-2 tw-px-4 tw-pt-4 tw-text-center">
<ng-content *ngIf="hasIcon; else elseBlock" select="[bit-dialog-icon]"></ng-content>

View File

@@ -1,11 +1,14 @@
import { Component, ContentChild, Directive } from "@angular/core";
import { fadeIn } from "../animations";
@Directive({ selector: "[bit-dialog-icon]" })
export class IconDirective {}
@Component({
selector: "bit-simple-dialog",
templateUrl: "./simple-dialog.component.html",
animations: [fadeIn],
})
export class SimpleDialogComponent {
@ContentChild(IconDirective) icon!: IconDirective;