From 0f593cb016aa45d2d9e5d04b8cc5e5a5f0e77d7f Mon Sep 17 00:00:00 2001 From: Clara Castillo Date: Wed, 6 Mar 2024 20:49:56 +0100 Subject: [PATCH] fix: toast styles via toastOptions --- apps/docs/src/app/app.component.ts | 2 +- libs/ngx-sonner/src/lib/toast.component.ts | 8 ++++---- package-lock.json | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/docs/src/app/app.component.ts b/apps/docs/src/app/app.component.ts index babb71e..9d36a8e 100644 --- a/apps/docs/src/app/app.component.ts +++ b/apps/docs/src/app/app.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, Component, signal } from '@angular/core'; -import { Position, NgxSonnerToaster } from 'ngx-sonner'; +import { NgxSonnerToaster, Position } from 'ngx-sonner'; import { ExpandComponent } from './components/expand.component'; import { FooterComponent } from './components/footer.component'; import { HeroComponent } from './components/hero.component'; diff --git a/libs/ngx-sonner/src/lib/toast.component.ts b/libs/ngx-sonner/src/lib/toast.component.ts index dfaf29e..fa0c407 100644 --- a/libs/ngx-sonner/src/lib/toast.component.ts +++ b/libs/ngx-sonner/src/lib/toast.component.ts @@ -3,14 +3,14 @@ import { AfterViewInit, ChangeDetectionStrategy, Component, - ElementRef, - OnDestroy, - ViewChild, computed, effect, + ElementRef, input, + OnDestroy, signal, untracked, + ViewChild, } from '@angular/core'; import { cn } from './internal/cn'; import { AsComponentPipe } from './pipes/as-component.pipe'; @@ -241,7 +241,7 @@ export class ToastComponent implements AfterViewInit, OnDestroy { classes: any = computed(() => ({ ...defaultClasses, - ...this._classes, + ...this._classes(), })); isFront = computed(() => this.index() === 0); diff --git a/package-lock.json b/package-lock.json index be573e9..9d62802 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ngx-sonner/source", - "version": "0.3.1", + "version": "0.3.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ngx-sonner/source", - "version": "0.3.1", + "version": "0.3.2", "license": "MIT", "dependencies": { "@angular/animations": "~17.1.0",