first init
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<script lang="ts" setup>
|
||||
import { cn } from "@mykopkb/core/utils/cn";
|
||||
import { carouselIndicator } from "@mykopkb/core/styles/carousel.styles";
|
||||
import type { Api, IndicatorProps } from "@zag-js/carousel";
|
||||
import { inject } from "vue";
|
||||
|
||||
const {
|
||||
class: className,
|
||||
asChild = false,
|
||||
index,
|
||||
...props
|
||||
} = defineProps<
|
||||
{
|
||||
class?: string;
|
||||
asChild?: boolean;
|
||||
} & IndicatorProps
|
||||
>();
|
||||
|
||||
const api = inject<Api>("carouselApi");
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<button :class="cn(carouselIndicator, className)"
|
||||
v-bind="{ ...props, ...$attrs, ...api?.getIndicatorProps({ index }) }" />
|
||||
</template>
|
||||
Reference in New Issue
Block a user