Files
calorie-tracker/src/lib/components/ui/carousel/carousel-item.svelte
2024-01-18 00:45:21 +02:00

25 lines
613 B
Svelte

<script lang="ts">
import { cn } from '$lib/utils';
import type { HTMLAttributes } from 'svelte/elements';
import { getEmblaContext } from './context.js';
type $$Props = HTMLAttributes<HTMLDivElement>;
let className: string | undefined | null = undefined;
export { className as class };
const { orientation } = getEmblaContext('<Carousel.Item/>');
</script>
<div
role="group"
aria-roledescription="slide"
class={cn(
'min-w-0 shrink-0 grow-0 basis-full',
$orientation === 'horizontal' ? 'pl-4' : 'pt-4',
className
)}
data-embla-slide=""
{...$$restProps}>
<slot />
</div>