Skip to content

Commit

Permalink
fix(Slider): add not-allowed cursor class for disabled state (#879)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cata1989 authored Mar 4, 2024
1 parent ae2ff6d commit 6bd4bf6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/beeq/src/components/slider/bq-slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export class BqSlider {
<div
class={{
[`bq-slider ${this.type}`]: true,
'opacity-60': this.disabled,
'cursor-not-allowed opacity-60': this.disabled,
}}
part="base"
aria-disabled={this.disabled ? 'true' : 'false'}
Expand Down
8 changes: 8 additions & 0 deletions packages/beeq/src/components/slider/scss/bq-slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@
@apply thumb-active;
}

.bq-slider__input[disabled]::-webkit-slider-thumb {
@apply cursor-not-allowed;
}

.bq-slider__input[disabled]::-moz-range-thumb {
@apply cursor-not-allowed;
}

.progress {
@apply absolute z-[var(--bq-slider--z-index-progress)] h-[var(--bq-slider--size)] rounded-[var(--bq-slider--border-radius)] bg-[var(--bq-slider--progress-color)];
}
Expand Down

0 comments on commit 6bd4bf6

Please sign in to comment.