components.vue 613 B

123456789101112131415161718192021222324252627
  1. <template>
  2. <div class="flex flex-col gap-4 min-h-screen p-2">
  3. <EditorWysiWyg />
  4. <div class="w-48 h-8 loading" />
  5. <button
  6. class="mt-3 w-full border-[1px] font-semibold text-md border-primary hover:bg-primary hover:text-black rounded-xl flex gap-3 justify-center items-center duration-150"
  7. @click="testSnackBar"
  8. >
  9. SnackBar
  10. </button>
  11. </div>
  12. </template>
  13. <script setup lang="ts">
  14. const { $snackbar } = useNuxtApp()
  15. definePageMeta({
  16. layout: 'none'
  17. })
  18. function testSnackBar() {
  19. $snackbar.add({
  20. type: 'success',
  21. text: 'This is a snackbar message'
  22. })
  23. }
  24. </script>