-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01cb433
commit 6654a53
Showing
2 changed files
with
64 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<template> | ||
<div v-click-outside="close" class="absolute left-1/2 transform -translate-x-1/2 top-3 z-50"> | ||
<div class="flex items-center w-full max-w-xs p-4 bg-neutral-200 rounded-lg shadow-lg"> | ||
<div class="ms-3 text-sm font-normal">{{ text }}</div> | ||
<button | ||
type="button" | ||
class="ms-auto -mx-1.5 -my-1.5 text-neutral-400 hover:text-neutral-600 rounded-lg p-1.5 inline-flex items-center justify-center h-8 w-8" | ||
data-dismiss-target="#toast-default" aria-label="Close" @click="close()"> | ||
<span class="sr-only">Close</span> | ||
<XMarkIcon /> | ||
</button> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { XMarkIcon } from "@heroicons/vue/24/outline"; | ||
// store | ||
const emits = defineEmits(["close"]); | ||
defineProps({ | ||
text: { | ||
type: String, | ||
required: true, | ||
}, | ||
}); | ||
setTimeout(() => close(), 3000); | ||
const close = () => emits('close'); | ||
</script> |