display description with line break
salacsoft opened this issue · comments
Joseph Salac commented
display description with line break
Baidi(Tony) Liu commented
Hey, thanks for reaching out! There are two ways to have line breaks in the description,
- the description actually accepts HTML, so you can basically do something like
createToast({ title: 'title', description: 'I want a line break here. <br/> Second line' })
- use the custom component approach:
// with props
import { createToast, withProps } from 'mosha-vue-toastify';
import CustomizedContent from "./CustomizedContent.vue";
import 'mosha-vue-toastify/dist/style.css';
export default defineComponent({
setup () {
const toast = () => {
createToast(withProps(CustomizedContent, { yourFavProp: 'bruh' }))
}
return { toast }
}
})