mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 16:38:20 +01:00
26 lines
753 B
TypeScript
26 lines
753 B
TypeScript
import type useEmblaCarousel from "embla-carousel-vue";
|
|
import type { EmblaCarouselVueType } from "embla-carousel-vue";
|
|
import type { HTMLAttributes, UnwrapRef } from "vue";
|
|
|
|
type CarouselApi = EmblaCarouselVueType[1];
|
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
type CarouselOptions = UseCarouselParameters[0];
|
|
type CarouselPlugin = UseCarouselParameters[1];
|
|
|
|
export type UnwrapRefCarouselApi = UnwrapRef<CarouselApi>;
|
|
|
|
export interface CarouselProps {
|
|
opts?: CarouselOptions;
|
|
plugins?: CarouselPlugin;
|
|
orientation?: "horizontal" | "vertical";
|
|
}
|
|
|
|
export type CarouselEmits = (
|
|
e: "init-api",
|
|
payload: UnwrapRefCarouselApi,
|
|
) => void;
|
|
|
|
export interface WithClassAsProps {
|
|
class?: HTMLAttributes["class"];
|
|
}
|