fix(components): ui prop override with class (#136)

This commit is contained in:
Benjamin Canac
2024-07-03 14:35:58 +02:00
committed by GitHub
parent 5a22c62b2a
commit 235556d3e0
50 changed files with 383 additions and 375 deletions

View File

@@ -76,7 +76,7 @@ const sliderValue = computed({
const thumbsCount = computed(() => sliderValue.value?.length ?? 1)
const ui = computed(() => tv({ extend: slider, slots: props.ui })({
const ui = computed(() => slider({
disabled: disabled.value,
size: size.value,
color: color.value,
@@ -103,10 +103,10 @@ function onChange(value: any) {
@update:model-value="emitFormInput()"
@value-commit="onChange"
>
<SliderTrack :class="ui.track()">
<SliderRange :class="ui.range()" />
<SliderTrack :class="ui.track({ class: props.ui?.track })">
<SliderRange :class="ui.range({ class: props.ui?.range })" />
</SliderTrack>
<SliderThumb v-for="count in thumbsCount" :key="count" :class="ui.thumb()" />
<SliderThumb v-for="count in thumbsCount" :key="count" :class="ui.thumb({ class: props.ui?.thumb })" />
</SliderRoot>
</template>