xiaoluoboding / vue-sonner

🔔 An opinionated toast component for Vue.

Home Page:https://vue-sonner.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

descriptionClassName not being applied

BayBreezy opened this issue · comments

Hello,

When I pass descriptionClassName to the toastOptions object, it does not get applied to the description text. I have this in my nuxt plugin

import { Toaster } from "vue-sonner";

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.component("Toaster", {
    setup(props, ctx) {
      return () =>
        h(Toaster, {
          toastOptions: {
            className: "!bg-background !text-foreground !border-border",
            descriptionClassName: "!text-muted-foreground",
          },
          ...props,
          ...ctx.attrs,
        });
    },
  });
});

The className gets applied but when I check the browser elements, for the description, I see undefined

image

@BayBreezy

it should be fixed in new release