command palette control

This commit is contained in:
Jan Prochazka
2021-02-25 18:05:44 +01:00
parent 30ade5867c
commit f0802dc471
13 changed files with 706 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
<script lang="ts">
import FontIcon from '../icons/FontIcon.svelte';
import { selectedWidget } from '../stores';
import { selectedWidget, visibleCommandPalette } from '../stores';
const widgets = [
{
@@ -48,6 +48,9 @@
//const handleChangeWidget= e => (selectedWidget.set(item.name))
</script>
<div class="wrapper mb-3" on:click={() => ($visibleCommandPalette = true)}>
<FontIcon icon="icon menu" />
</div>
{#each widgets as item}
<div class="wrapper" class:selected={item.name == $selectedWidget} on:click={() => handleChangeWidget(item.name)}>
<FontIcon icon={item.icon} />