Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How Pass html to the toast? i want to show UL/LI menu inside the toast #17

Open
beshoo opened this issue May 21, 2023 · 4 comments
Open

Comments

@beshoo
Copy link

beshoo commented May 21, 2023

How to Pass html to the toast? I want to show UL/LI menu inside the toast.

@wobsoriano
Copy link
Contributor

Use the headless version:

<template>
  <ul>
    <li>Item 1</li>
    <li>Item 2</li>
  </ul>
  <button @click="$emit('closeToast')">Close</button>
</template>
import { toast } from 'vue-sonner'
import MyComponent from './MyComponent.vue'

toast.custom(MyComponent)

@sadeghbarati
Copy link
Contributor

Yes just like Wobsoriano said but don't forget about markRaw(MyComponent)

@ricardo17coelho
Copy link

@sadeghbarati this not a nice solution if u just want to "render" html text.
For ex: VueSonner is AWESOME currently is rendered as VueSonenr is AWESOME
I would like to keep using the "types" with the default style.

@ricardo17coelho
Copy link

any update here ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants