Skip to content

Commit

Permalink
feat: use YToast component in useAutoToast
Browse files Browse the repository at this point in the history
  • Loading branch information
Axolotle committed Dec 16, 2024
1 parent 992fab1 commit ee0fd76
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/composables/useAutoToast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import type { OrchestratedToast } from 'bootstrap-vue-next'
import { useToastController } from 'bootstrap-vue-next'
import { ref } from 'vue'

import YToast from '@/components/YToast.vue'

type useToastControllerInstance = ReturnType<typeof useToastController>

export const useAutoToast = createGlobalState(() => {
Expand All @@ -13,7 +15,7 @@ export const useAutoToast = createGlobalState(() => {
}

function show(props: OrchestratedToast) {
toastController.value?.show?.({ props })
toastController.value?.show?.({ props, component: YToast })
}

return { init, show }
Expand Down

0 comments on commit ee0fd76

Please sign in to comment.