xiaoluoboding / vue-sonner

🔔 An opinionated toast component for Vue.
https://vue-sonner.robertshaw.id
MIT License
889 stars 46 forks source link

descriptionClassName not being applied #30

Closed BayBreezy closed 7 months ago

BayBreezy commented 1 year ago

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

sadeghbarati commented 7 months ago

@BayBreezy

it should be fixed in new release