szboynono / mosha-vue-toastify

A light weight and fun Vue 3 toast or notification or snack bar or however you wanna call it library.

Home Page:https://szboynono.github.io/mosha-vue-toastify/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

display description with line break

salacsoft opened this issue · comments

display description with line break

Hey, thanks for reaching out! There are two ways to have line breaks in the description,

  1. 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' })
  1. 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 }
  }
})