File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
react/src/components/Toggle
styles/scss/components/toggle
web-components/src/components/toggle Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ export function Toggle({
203203 { labelText && < Text className = { labelTextClasses } > { labelText } </ Text > }
204204 < div className = { appearanceClasses } >
205205 < div className = { switchClasses } >
206- { isSm && (
206+ { isSm && ! readOnly && (
207207 < svg
208208 aria-hidden = "true"
209209 focusable = "false"
Original file line number Diff line number Diff line change 176176 background-color : transparent ;
177177
178178 & ::before {
179- background-color : $text -primary ;
179+ background-color : $icon -primary ;
180180 inset-block-start : convert .to-rem (2px );
181181 inset-inline-start : convert .to-rem (2px );
182182 }
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ class CDSToggle extends HostListenerMixin(CDSCheckbox) {
5454 }
5555
5656 protected _renderCheckmark ( ) {
57- if ( this . size !== TOGGLE_SIZE . SMALL ) {
57+ if ( this . size !== TOGGLE_SIZE . SMALL || this . readOnly == true ) {
5858 return undefined ;
5959 }
6060 return html `
You can’t perform that action at this time.
0 commit comments