Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add content class in base slider to ease customisation #1662

Merged
merged 5 commits into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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