UX: Add disabled styling to `<DToggleSwitch/>` (#22988)
This commit is contained in:
parent
282e43d806
commit
1ded0a1429
|
@ -13,7 +13,7 @@
|
|||
background-color: var(--primary-high);
|
||||
}
|
||||
|
||||
.d-toggle-switch__checkbox[aria-checked="true"]
|
||||
.d-toggle-switch__checkbox[aria-checked="true"]:not([disabled])
|
||||
+ .d-toggle-switch__checkbox-slider {
|
||||
background-color: var(--tertiary-hover);
|
||||
}
|
||||
|
@ -41,6 +41,15 @@
|
|||
left: calc(var(--toggle-switch-width) - 22px);
|
||||
}
|
||||
|
||||
&__checkbox[disabled] + .d-toggle-switch__checkbox-slider {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
|
||||
&::before {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
&__checkbox-slider {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
|
|
Loading…
Reference in New Issue