added svelte-shadcn
This commit is contained in:
24
src/lib/components/ui/carousel/carousel-item.svelte
Normal file
24
src/lib/components/ui/carousel/carousel-item.svelte
Normal file
@@ -0,0 +1,24 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user