Skip to content

Commit 9293a18

Browse files
committed
feat(toggle): add helper and error text to the ionic theme
1 parent 40932d7 commit 9293a18

File tree

3 files changed

+42
-12
lines changed

3 files changed

+42
-12
lines changed

core/src/components/toggle/toggle.common.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,21 +117,13 @@ input {
117117
// ----------------------------------------------------------------
118118

119119
.toggle-bottom {
120-
@include padding(4px, null, null, null);
121-
122120
display: flex;
123121

124122
justify-content: space-between;
125123

126-
font-size: dynamic-font(12px);
127-
128124
white-space: normal;
129125
}
130126

131-
:host(.toggle-label-placement-stacked) .toggle-bottom {
132-
font-size: dynamic-font(16px);
133-
}
134-
135127
// Toggle Hint Text
136128
// ----------------------------------------------------------------
137129

@@ -142,14 +134,10 @@ input {
142134
*/
143135
.toggle-bottom .error-text {
144136
display: none;
145-
146-
color: ion-color(danger, base);
147137
}
148138

149139
.toggle-bottom .helper-text {
150140
display: block;
151-
152-
color: $text-color-step-300;
153141
}
154142

155143
:host(.ion-touched.ion-invalid) .toggle-bottom .error-text {

core/src/components/toggle/toggle.ionic.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,24 @@
5454
background: globals.current-color(base);
5555
}
5656

57+
// Toggle Bottom Content
58+
// ----------------------------------------------------------------
59+
60+
.toggle-bottom {
61+
@include globals.typography(globals.$ion-body-md-regular);
62+
}
63+
64+
// Toggle Hint Text
65+
// ----------------------------------------------------------------
66+
67+
.toggle-bottom .error-text {
68+
color: globals.$ion-semantics-danger-800;
69+
}
70+
71+
.toggle-bottom .helper-text {
72+
color: globals.$ion-primitives-neutral-800;
73+
}
74+
5775
// Toggle Native Wrapper: Focused
5876
// ----------------------------------------------------------------
5977

core/src/components/toggle/toggle.native.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,30 @@
1717
@include margin(null, null, $toggle-item-label-margin-bottom, null);
1818
}
1919

20+
// Toggle Bottom Content
21+
// ----------------------------------------------------------------
22+
23+
.toggle-bottom {
24+
@include padding(4px, null, null, null);
25+
26+
font-size: dynamic-font(12px);
27+
}
28+
29+
:host(.toggle-label-placement-stacked) .toggle-bottom {
30+
font-size: dynamic-font(16px);
31+
}
32+
33+
// Toggle Hint Text
34+
// ----------------------------------------------------------------
35+
36+
.toggle-bottom .error-text {
37+
color: ion-color(danger, base);
38+
}
39+
40+
.toggle-bottom .helper-text {
41+
color: $text-color-step-300;
42+
}
43+
2044
// Input Label
2145
// ----------------------------------------------------------------
2246

0 commit comments

Comments
 (0)