Skip to content

Commit 82efcb0

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

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.changeset/happy-chairs-watch.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"@justeattakeaway/pie-divider": minor
44
"@justeattakeaway/pie-icon-button": minor
55
"@justeattakeaway/pie-modal": minor
6+
"@justeattakeaway/pie-switch": minor
67
"@justeattakeaway/pie-tag": minor
78
---
89

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)