This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
forked from elk-zone/elk
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Showing
8 changed files
with
129 additions
and
11 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
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,57 @@ | ||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
const isVisible = ref(false) | ||
function show() { | ||
isVisible.value = true | ||
setTimeout(() => { | ||
hide() | ||
}, 10000) | ||
} | ||
function hide() { | ||
isVisible.value = false | ||
} | ||
defineExpose({ | ||
show, | ||
hide, | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="snackbar-wrapper"> | ||
<div | ||
:class="{ active: isVisible }" | ||
class="snackbar" | ||
> | ||
Your post was published | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.snackbar-wrapper { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
.snackbar { | ||
background: var(--c-primary); | ||
border-radius: 8px; | ||
border: 1px solid var(--c-primary-light); | ||
color: var(--c-text-base-light); | ||
font-size: 12px; | ||
font-weight: 600; | ||
line-height: 16px; | ||
min-width: 280px; | ||
opacity: 0; | ||
padding: 8px 16px; | ||
text-align: center; | ||
transition: opacity 800ms ease-in-out; | ||
} | ||
.snackbar.active { | ||
opacity: 1; | ||
} | ||
</style> |
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
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
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