feat(Carousel): allow customization of active dot color (#4229)

This commit is contained in:
J-Michalek
2025-05-26 17:48:30 +02:00
committed by GitHub
parent 62bc7b25a2
commit 2ee1c5ac2e
2 changed files with 2 additions and 1 deletions

View File

@@ -336,6 +336,7 @@ defineExpose({
<button
:aria-label="t('carousel.goto', { slide: index + 1 })"
:class="ui.dot({ class: props.ui?.dot, active: selectedIndex === index })"
:data-state="selectedIndex === index ? 'active' : undefined"
@click="scrollTo(index)"
/>
</template>

View File

@@ -30,7 +30,7 @@ export default (options: Required<ModuleOptions>) => ({
},
active: {
true: {
dot: 'bg-inverted'
dot: 'data-[state=active]:bg-inverted'
}
}
}