Piped/src/components/ToastComponent.vue

29 lines
524 B
Vue
Raw Normal View History

2023-03-02 21:56:06 +00:00
<template>
<div class="toast">
<slot />
<button @click="dismiss" v-t="'actions.dismiss'" />
</div>
</template>
<script>
export default {
methods: {
dismiss() {
this.$emit("dismissed");
},
},
};
</script>
<style>
.toast {
2023-03-11 17:55:25 +00:00
@apply bg-white/80 text-black flex flex-col justify-center fixed top-12 right-12 p-4 min-w-max shadow rounded duration-200 z-9999;
}
.dark .toast {
@apply bg-dark-900/80 text-white;
2023-03-02 21:56:06 +00:00
}
.toast button {
@apply underline;
}
</style>