unsaved file marker

This commit is contained in:
Jan Prochazka
2022-09-29 13:58:09 +02:00
parent 1382461bdc
commit 7604889b72
7 changed files with 59 additions and 14 deletions

View File

@@ -0,0 +1,31 @@
<script lang="ts">
import FontIcon from '../icons/FontIcon.svelte';
export let unsaved = false;
let mousein = false;
</script>
<span
class="close-button tabCloseButton"
on:click
on:mouseenter={() => {
mousein = true;
}}
on:mouseleave={() => {
mousein = false;
}}
>
<FontIcon icon={unsaved && !mousein ? 'icon unsaved' : 'icon close'} />
</span>
<style>
.close-button {
margin-left: 5px;
color: var(--theme-font-3);
}
.close-button:hover {
color: var(--theme-font-1);
}
</style>