primevue-mirror/doc/toast/ToastServiceDoc.vue

24 lines
613 B
Vue

<template>
<DocSectionText v-bind="$attrs">
<p>Toast messages are dynamically created using a <i>ToastService</i> that needs to be installed globally before the application instance is created.</p>
</DocSectionText>
<DocSectionCode :code="code" hideToggleCode import hideCodeSandbox hideStackBlitz />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
import {createApp} from 'vue';
import ToastService from 'primevue/toastservice';
const app = createApp(App);
app.use(ToastService);`
}
};
}
};
</script>