fixed TS + code tidy

This commit is contained in:
Jan Prochazka
2023-02-25 11:57:30 +01:00
parent 4e97f54bd4
commit eb04f56662
11 changed files with 2 additions and 111 deletions

View File

@@ -0,0 +1,48 @@
<script lang="ts">
import { getContext } from 'svelte';
import FontIcon from '../icons/FontIcon.svelte';
import ToolbarButton from '../buttons/ToolbarButton.svelte';
export let onExecute;
const selectedMacro = getContext('selectedMacro') as any;
</script>
<div class="container">
<div class="header">
<FontIcon icon="img macro" />
<div class="ml-2">
{$selectedMacro?.title}
</div>
</div>
<div class="buttons">
<ToolbarButton icon="icon run" on:click={onExecute}>Execute</ToolbarButton>
<ToolbarButton icon="icon close" on:click={() => ($selectedMacro = null)}>Close</ToolbarButton>
</div>
</div>
<style>
.container {
display: flex;
justify-content: space-between;
align-items: stretch;
background: var(--theme-bg-modalheader);
height: var(--dim-toolbar-height);
min-height: var(--dim-toolbar-height);
overflow: hidden;
border-top: 1px solid var(--theme-border);
border-bottom: 1px solid var(--theme-border);
}
.header {
font-weight: bold;
margin-left: 10px;
display: flex;
align-items: center;
}
.buttons {
display: flex;
align-items: stretch;
}
</style>