open structure/data from status bar

This commit is contained in:
Jan Prochazka
2021-11-21 12:54:12 +01:00
parent 6a606bc733
commit 51c490218a
5 changed files with 52 additions and 2 deletions

View File

@@ -5,12 +5,15 @@
import { updateStatuBarInfoItem } from './StatusBar.svelte';
export let text;
export let clickable = false;
export let icon = null;
export let onClick = null;
const key = uuidv1();
const tabid = getContext('tabid');
onMount(() => {
updateStatuBarInfoItem(tabid, key, { text });
updateStatuBarInfoItem(tabid, key, { text, icon, clickable, onClick });
});
onDestroy(() => updateStatuBarInfoItem(tabid, key, null));
</script>