mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 15:25:59 +00:00
#810 hide non active tool strip containers
This commit is contained in:
@@ -1,11 +1,24 @@
|
||||
<script lang="ts">
|
||||
import { get_current_component } from 'svelte/internal';
|
||||
import createActivator, { isComponentActiveStore } from '../utility/createActivator';
|
||||
|
||||
const thisInstance = get_current_component();
|
||||
|
||||
export const activator = createActivator('ToolStripContainer', false);
|
||||
|
||||
$: isComponentActive = $isComponentActiveStore('ToolStripContainer', thisInstance);
|
||||
</script>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
<div class="toolstrip">
|
||||
<slot name="toolstrip" />
|
||||
</div>
|
||||
{#if isComponentActive}
|
||||
<div class="toolstrip">
|
||||
<slot name="toolstrip" />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user