mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
feat(Carousel): allow customization of active dot color (#4229)
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -30,7 +30,7 @@ export default (options: Required<ModuleOptions>) => ({
|
||||
},
|
||||
active: {
|
||||
true: {
|
||||
dot: 'bg-inverted'
|
||||
dot: 'data-[state=active]:bg-inverted'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user