Skip to content

Commit

Permalink
feat: Add content class in base slider to ease customisation (#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
annacv authored Nov 25, 2024
1 parent 662b956 commit 63d7b99
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/x-components/src/components/base-slider.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="x-base-slider">
<div ref="slider" class="x-base-slider__nouislider" />
<div ref="slider" :class="['x-base-slider__nouislider'].concat(`${contentClass}`)" />
<div class="x-base-slider__selected">
<!--
@slot Default selected range rendering. This slot will be used by default for rendering
Expand Down Expand Up @@ -49,6 +49,11 @@
modelValue: {
type: Object as PropType<{ min: number; max: number }>,
required: true
},
/** Class to be able to customize slider styles. */
contentClass: {
type: String,
default: ''
}
},
/**
Expand Down Expand Up @@ -173,6 +178,10 @@
padding: 0 16px;
}
.x-base-slider__nouislider .noUi-handle {
box-shadow: none;
}
.x-base-slider__nouislider .noUi-handle:before,
.x-base-slider__nouislider .noUi-handle:after {
content: none;
Expand Down

0 comments on commit 63d7b99

Please sign in to comment.