From da3fdda0ab19c4b2bc15443f4f4656237c40f74e Mon Sep 17 00:00:00 2001 From: Clara Castillo Date: Tue, 16 Apr 2024 13:16:17 +0200 Subject: [PATCH] feat: add closeButton property to toast options (#17) * feat: add closeButton property to toast options * tests: add closeButton tests --- libs/ngx-sonner/src/lib/toast.component.ts | 7 +++++-- libs/ngx-sonner/src/lib/types.ts | 11 ++++++----- libs/ngx-sonner/src/tests/toaster.spec.ts | 15 +++++++++++++-- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/libs/ngx-sonner/src/lib/toast.component.ts b/libs/ngx-sonner/src/lib/toast.component.ts index 101a6b0..3bbb736 100644 --- a/libs/ngx-sonner/src/lib/toast.component.ts +++ b/libs/ngx-sonner/src/lib/toast.component.ts @@ -79,7 +79,7 @@ const defaultClasses: ToastClassnames = { (pointerdown)="onPointerDown($event)" (pointerup)="onPointerUp()" (pointermove)="onPointerMove($event)"> - @if (toast().dismissible && closeButton() && !toast().component) { + @if (closeButton() && !toast().component) {