diff --git a/app.vue b/app.vue index 732f492..3414cc5 100644 --- a/app.vue +++ b/app.vue @@ -45,7 +45,9 @@ title="Dropdown" :title="''" :pt="{ - root: { class: 'w-[100px] h-10 text-left relative' }, + root: { + class: 'relative cursor-pointer w-[100px] h-10 text-left relative', + }, dropdown: { class: 'w-[150px] right-[-50px] absolute mt-4 block', }, @@ -78,22 +80,21 @@ :direction="'horizontal'" :pt="{ root: { class: '' }, - slider: { class: '' }, + slider: { class: 'bg-black text-white' }, counter: { class: '' }, + progress: { class: '' }, }" class="my-[50px] relative z-30" > @@ -123,7 +93,10 @@ const classes = ref({ counter: { class: `max-w-[1200px] mx-auto px-6 container`, }, -} as PTAttribs); + progress: { + class: "", + }, +} as unknown as PTAttribs); const rootClasses = computed(() => twMerge(classes.value.root?.class, props.pt?.root?.class) @@ -134,6 +107,9 @@ const sliderClasses = computed(() => const counterClasses = computed(() => twMerge(classes.value.counter?.class, props.pt?.counter?.class) ); +const progressClass = computed(() => + twMerge(classes.value.progress?.class, props.pt?.progress?.class) +); const items = props.items; diff --git a/src/components/Ml/Slider/types.ts b/src/components/Ml/Slider/types.ts index a2068dc..7a9f63b 100644 --- a/src/components/Ml/Slider/types.ts +++ b/src/components/Ml/Slider/types.ts @@ -1,22 +1,25 @@ export type SliderProps = { - direction: 'horizontal' | 'vertical'; - pt?: PTAttribs; - items: Array<[{ title: string; info: string }]>; + direction: "horizontal" | "vertical"; + pt?: PTAttribs; + items: Array<[{ title: string; info: string }]>; }; export type PTAttribs = { - root?: { - class: string; - }; - slider?: { - class: string; - }; - counter?: { - class: string; - }; - direction?: { - direction: string; - }; + root?: { + class: string; + }; + slider?: { + class: string; + }; + counter?: { + class: string; + }; + direction?: { + direction: string; + }; + progress?: { + direction: string; + }; }; -export type spinerPlace = 'suffix' | 'prefix'; +export type spinerPlace = "suffix" | "prefix";