mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-30 03:38:54 +01:00
feat(Carousel): allow customization of active dot color (#4229)
This commit is contained in:
@@ -336,6 +336,7 @@ defineExpose({
|
|||||||
<button
|
<button
|
||||||
:aria-label="t('carousel.goto', { slide: index + 1 })"
|
:aria-label="t('carousel.goto', { slide: index + 1 })"
|
||||||
:class="ui.dot({ class: props.ui?.dot, active: selectedIndex === index })"
|
:class="ui.dot({ class: props.ui?.dot, active: selectedIndex === index })"
|
||||||
|
:data-state="selectedIndex === index ? 'active' : undefined"
|
||||||
@click="scrollTo(index)"
|
@click="scrollTo(index)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export default (options: Required<ModuleOptions>) => ({
|
|||||||
},
|
},
|
||||||
active: {
|
active: {
|
||||||
true: {
|
true: {
|
||||||
dot: 'bg-inverted'
|
dot: 'data-[state=active]:bg-inverted'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user