feat(frontend): Add tooltip to app recompute (#1122)

This commit is contained in:
Ádám Kovács
2023-01-18 10:10:47 +01:00
committed by GitHub
parent 45191621d2
commit 4dfdf374af
2 changed files with 11 additions and 2 deletions
@@ -23,7 +23,7 @@
}
</script>
<PanelSection title="Recompute after this compute">
<PanelSection title="Recompute others" tooltip="Select components to recompute after running this script">
{#if Object.keys($runnableComponents ?? {}).filter((id) => id !== ownId).length > 0}
<table class="divide-y divide-gray-300 border w-full">
<thead class="bg-gray-50">
@@ -1,10 +1,12 @@
<script lang="ts">
import { classNames } from '$lib/utils'
import Tooltip from '../../../../Tooltip.svelte'
export let title: string
export let smallPadding: boolean = false
export let noPadding: boolean = false
export let titlePadding: string = ''
export let tooltip = ''
</script>
<div
@@ -15,7 +17,14 @@
)}
>
<div class="flex justify-between items-center w-full gap-1">
<div class="text-sm font-extrabold {titlePadding}">{title}</div>
<div class="text-sm font-extrabold {titlePadding}">
{title}
{#if tooltip}
<Tooltip>
{tooltip}
</Tooltip>
{/if}
</div>
<slot name="action" />
</div>
<slot />