feat: add tooltip to secret component

This commit is contained in:
Arman
2023-02-08 14:31:43 +01:00
parent 0d1377e7db
commit 0d82e72e19
+3 -1
View File
@@ -1,4 +1,5 @@
<script lang="ts">
import { tooltip } from '$lib/actions/tooltip';
import { Copy } from '.';
export let show = false;
@@ -16,7 +17,8 @@
class="interactive-text-output-button"
aria-label="show hidden text"
type="button"
on:click={() => (show = !show)}>
on:click={() => (show = !show)}
use:tooltip={{ content: show ? 'Hide secret' : 'Show secret', hideOnClick: false }}>
<span class:icon-eye-off={show} class:icon-eye={!show} aria-hidden="true" />
</button>
<Copy {value}>