-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
problem: message box does not clear after publishing a note (#28)
- Loading branch information
Showing
5 changed files
with
81 additions
and
40 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,13 +1,20 @@ | ||
<script lang="ts"> | ||
export let onClick: () => void; | ||
export let notifs = 0 | ||
export let onClick: () => void; | ||
export let notifs = 0; | ||
export let disabled: boolean = false; | ||
</script> | ||
<button on:click={onClick} class="relative text-slate-800 dark:text-slate-200 font-medium rounded-lg text-sm p-2.5 text-center inline-flex items-center"> | ||
<slot></slot> | ||
{#if notifs > 0} | ||
<div | ||
class="absolute inline-flex items-center justify-center w-5 h-5 text-xs font-bold text-white bg-orange-500 rounded-sm -top-1 -end-1" | ||
|
||
<button | ||
on:click={onClick} | ||
class="relative inline-flex items-center rounded-lg p-2.5 text-center text-sm font-medium text-slate-800 dark:text-slate-200" | ||
{disabled} | ||
> | ||
{notifs} | ||
</div>{/if} | ||
<slot /> | ||
{#if notifs > 0} | ||
<div | ||
class="absolute -end-1 -top-1 inline-flex h-5 w-5 items-center justify-center rounded-sm bg-orange-500 text-xs font-bold text-white" | ||
> | ||
{notifs} | ||
</div> | ||
{/if} | ||
</button> |
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