Skip to content

Commit 209bb02

Browse files
authored
fix: Make color slider disabled state consistent with disabled color area (#489)
* Make color slider disabled state consistent with disabled color area * Add cursor on parent and disable pointer events on child
1 parent f9c6343 commit 209bb02

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

packages/uui-color-area/lib/uui-color-area.element.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,17 @@ export class UUIColorAreaElement extends LitElement {
2424
width: 280px;
2525
height: 200px;
2626
}
27+
2728
:host([disabled]) {
28-
pointer-events: none;
2929
cursor: not-allowed;
30+
}
31+
32+
:host([disabled]) .color-area {
33+
user-select: none;
34+
pointer-events: none;
3035
opacity: 0.55;
3136
}
37+
3238
.color-area {
3339
position: relative;
3440
height: 100%;

packages/uui-color-slider/lib/uui-color-slider.element.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,14 @@ export class UUIColorSliderElement extends LabelMixin('label', LitElement) {
9595
height: 300px;
9696
}
9797
98+
:host([disabled]) {
99+
cursor: not-allowed;
100+
}
101+
98102
:host([disabled]) #color-slider {
99103
user-select: none;
100-
cursor: not-allowed;
104+
pointer-events: none;
105+
opacity: 0.55;
101106
}
102107
103108
#color-slider__handle {

0 commit comments

Comments
 (0)