Skip to content

Commit 48f3dd6

Browse files
xander-marjoramJoshuaNg2332
authored andcommitted
cosmetic(pie-monorepo): PEW-89 update component styles for dark mode (#2182)
* cosmetic(pie-monorepo): PEW-89 update component styles for dark mode * Fix linting error * PEW-89: Use correct colour tokens for text in tag brand variants * PEW-89: Update icon button's icon fill colour * Update yarn.lock * PEW-89: Use token for switch internal label font colour
1 parent b1185de commit 48f3dd6

File tree

9 files changed

+113
-95
lines changed

9 files changed

+113
-95
lines changed

.changeset/happy-chairs-watch.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@justeattakeaway/pie-button": minor
3+
"@justeattakeaway/pie-divider": minor
4+
"@justeattakeaway/pie-icon-button": minor
5+
"@justeattakeaway/pie-modal": minor
6+
"@justeattakeaway/pie-switch": minor
7+
"@justeattakeaway/pie-tag": minor
8+
---
9+
10+
[Changed] - Update styling for dark mode

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// The following values set to default background and color
2525
// currently this sets the primary button styles
2626
--btn-bg-color: var(--dt-color-interactive-brand);
27-
--btn-text-color: var(--dt-color-content-interactive-primary);
27+
--btn-text-color: var(--dt-color-content-interactive-light);
2828
--icon-display-override: block;
2929

3030
// Vertical and horizontal padding values for the button
@@ -131,6 +131,7 @@
131131
* update the button backgrounds so that the text is accessible
132132
**/
133133
--btn-bg-color: var(--dt-color-interactive-primary);
134+
--btn-text-color: var(--dt-color-content-interactive-primary);
134135

135136
@include p.button-interactive-states('--dt-color-interactive-primary', 'inverse');
136137
}

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

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
text-align: center;
2929
gap: var(--dt-spacing-b);
3030
background-color: transparent;
31+
color: var(--dt-color-content-subdued);
3132

3233
.c-divider-label {
3334
font-size: var(--divider-font-size);

packages/components/pie-icon-button/src/iconButton.scss

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
.o-iconBtn {
1414
--btn-border-radius: var(--dt-radius-rounded-e);
1515
--btn-bg-color: var(--dt-color-interactive-brand);
16-
--btn-icon-fill: var(--dt-color-content-interactive-primary);
16+
--btn-icon-fill: var(--dt-color-content-interactive-light);
1717
--icon-display-override: block;
1818

1919
block-size: var(--btn-dimension, var(--btn-dimension-default));
@@ -125,4 +125,3 @@
125125
--icon-size-override: 28px;
126126
}
127127
}
128-

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

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
border: none;
4343
box-shadow: var(--modal-elevation);
4444
font-family: var(--modal-font);
45+
color: var(--dt-color-content-default);
4546
background-color: var(--modal-bg-color);
4647

4748
padding: 0;

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;

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,13 @@
157157

158158
&.c-tag--brand-03 {
159159
--tag-bg-color: var(--dt-color-support-brand-03);
160-
--tag-color: var(--dt-color-content-default);
160+
--tag-color: var(--dt-color-content-dark);
161161
@include tag-interactive-states('--dt-color-support-brand-03');
162162
}
163163

164164
&.c-tag--brand-04 {
165165
--tag-bg-color: var(--dt-color-support-brand-04);
166-
--tag-color: var(--dt-color-content-default);
166+
--tag-color: var(--dt-color-content-dark);
167167
@include tag-interactive-states('--dt-color-support-brand-04');
168168
}
169169

0 commit comments

Comments
 (0)