xiaoluoboding / vue-sonner

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

custom component - option to keep style #45

Open andrei4002 opened 8 months ago

andrei4002 commented 8 months ago

I have a scenario where i'd like to render a custom vue component, and i do so like this:

toast.message(
  markRaw(
    defineComponent({
      render() {
        return h(ChatToast, { message })
      },
    })
  )
)

the problem here is that the component always gets rendered in headless mode. an option to keep the styles would be useful, for cases where you just want to render the inner part of the notification, using a custom component

sadeghbarati commented 7 months ago

@andrei4002 check docs and search for Headless and Custom with props