Files
Crussell/frontend/src/lib/components/ui/map/MarkerLabel.svelte
T
popertots 4af2b8dfb4
Backend CI / Tests (push) Failing after 1m41s
Backend CI / Lint & vulns (push) Failing after 2m26s
Backend CI / Race detector (push) Failing after 3m45s
style: fix prefer-const and prettier formatting issues
2026-06-25 13:48:03 +01:00

28 lines
537 B
Svelte

<script lang="ts">
import { cn } from '$lib/utils.js';
interface Props {
children?: import('svelte').Snippet;
class?: string;
position?: 'top' | 'bottom';
}
const { children, class: className, position = 'top' }: Props = $props();
const positionClasses = {
top: 'bottom-full mb-1',
bottom: 'top-full mt-1'
};
</script>
<div
class={cn(
'absolute left-1/2 -translate-x-1/2 whitespace-nowrap',
'text-[10px] font-medium text-foreground',
positionClasses[position],
className
)}
>
{@render children?.()}
</div>