File size: 1,076 Bytes
88503f9
 
 
 
 
 
 
 
 
 
 
 
 
 
402952a
88503f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<script lang="ts">
	import Copy from "./Copy.svelte";
	import RemoveTags from "./RemoveTags.svelte";
    import { createEventDispatcher } from 'svelte';

	export let value: string;
	export let show_copy_button: boolean = false;
    export let show_remove_tags_button: boolean = false;
    const dispatch = createEventDispatcher()

</script>

<div>
    {#if show_remove_tags_button}
        <RemoveTags on:clear={() => dispatch("clear")}/>
    {/if}
    {#if show_copy_button}
        <Copy {value} />
    {/if}
</div>

<style>
	div {
		display: flex;
		position: absolute;
		top: var(--block-label-margin);
		right: var(--block-label-margin);
		align-items: center;

		z-index: var(--layer-2);
		transition: 150ms;
		box-shadow: var(--shadow-drop);
		border: 1px solid var(--border-color-primary);
		border-top: none;
		border-right: none;
		border-radius: var(--block-label-right-radius);
		background: var(--block-label-background-fill);
		overflow: hidden;
		color: var(--block-label-text-color);
		font: var(--font);
		font-size: var(--button-small-text-size);
	}
</style>