1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 23:03:32 +00:00
Files
browser/libs/components/src/toast/toastr.component.ts
renovate[bot] e1447a90e3 [deps] Design System: Update ngx-toastr to v19 (#10594)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Victoria League <vleague@bitwarden.com>
2024-12-17 10:08:19 -05:00

27 lines
898 B
TypeScript

import { animate, state, style, transition, trigger } from "@angular/animations";
import { Component } from "@angular/core";
import { Toast as BaseToastrComponent } from "ngx-toastr";
@Component({
template: `
<bit-toast
[title]="options?.payload?.title"
[variant]="options?.payload?.variant"
[message]="options?.payload?.message"
[progressWidth]="width()"
(onClose)="remove()"
></bit-toast>
`,
animations: [
trigger("flyInOut", [
state("inactive", style({ opacity: 0 })),
state("active", style({ opacity: 1 })),
state("removed", style({ opacity: 0 })),
transition("inactive => active", animate("{{ easeTime }}ms {{ easing }}")),
transition("active => removed", animate("{{ easeTime }}ms {{ easing }}")),
]),
],
preserveWhitespaces: false,
})
export class BitwardenToastrComponent extends BaseToastrComponent {}