blob: e172e161cba7ef9afe3bdc7b5b4fecf8c9730129 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<script lang="ts">
interface Props {
selected: boolean;
position: 'top' | 'right' | 'left' | 'bottom';
centered?: boolean;
}
let { selected, position, centered = false }: Props = $props();
</script>
{#if selected}
<div
class:items-center={centered}
class="{position} pointer-events-none absolute z-1 flex bg-emerald-700/95"
>
<span class="icon-[material-symbols--check] text-[2rem]"></span>
</div>
{/if}
<style lang="postcss">
.top,
.bottom {
width: 100%;
}
.left,
.right {
height: 100%;
}
.bottom {
bottom: 0;
}
.right {
right: 0;
}
</style>
|