summaryrefslogtreecommitdiffstatshomepage
path: root/frontend/src/lib/toolbar/MarkSelection.svelte
blob: 27eb2c72e110283af52c6d3f643280a236e3ba04 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<script lang="ts">
	import Dropdown from '$lib/components/Dropdown.svelte';

	let visible = false;
	let button: HTMLElement;
</script>

<div class="relative">
	<button
		type="button"
		class="btn-slate rounded-inherit relative hover:bg-blue-700 [&:not(:only-child)]:bg-blue-700"
		title="Set flag..."
		bind:this={button}
		on:click={() => (visible = !visible)}
	>
		<span class="icon-base icon-[material-symbols--flag] pointer-events-none" />
	</button>

	<Dropdown parent={button} bind:visible>
		<div class="grid grid-cols-[min-content_min-content] gap-1">
			<slot />
		</div>
	</Dropdown>
</div>