Skip to content

Commit 83a147c

Browse files
PEW-89: Use token for switch internal label font colour
1 parent 4353805 commit 83a147c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/components/pie-switch/src/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ export class PieSwitch extends FormControlMixin(RtlMixin(LitElement)) implements
160160
}
161161

162162
return html`
163-
<span data-test-id="switch-label-${labelPlacement}">
163+
<span
164+
data-test-id="switch-label-${labelPlacement}"
165+
class="c-switch-label">
164166
${label}
165167
</span>`;
166168
}

packages/components/pie-switch/src/switch.scss

+4
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@
137137
}
138138
}
139139

140+
.c-switch-label {
141+
color: var(--dt-color-content-default);
142+
}
143+
140144
// The description is only required for screen readers so we need to visually hide the description
141145
.c-switch-description {
142146
@include p.visually-hidden;

0 commit comments

Comments
 (0)