Skip to content

Commit 751ed3a

Browse files
committed
feat(textarea): add valid state support for helper text and disabled states
1 parent 1f12fd9 commit 751ed3a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

core/src/components/textarea/textarea.ionic.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ ion-icon {
134134
color: globals.$ion-primitives-neutral-800;
135135
}
136136

137+
:host(.has-focus.ion-valid) .helper-text {
138+
color: var(--highlight-color-valid);
139+
}
140+
137141
:host(.has-focus.ion-valid),
138142
:host(.ion-touched.ion-invalid) {
139143
--border-width: #{globals.$ion-border-size-025};
@@ -193,6 +197,21 @@ ion-icon {
193197
color: globals.$ion-primitives-neutral-500;
194198
}
195199

200+
:host(.textarea-disabled.has-focus.ion-valid) {
201+
--border-color: rgba(#{globals.$ion-semantics-success-base-rgb}, 0.6);
202+
}
203+
204+
:host(.textarea-disabled.ion-touched.ion-invalid) {
205+
--border-color: rgba(#{globals.$ion-semantics-danger-base-rgb}, 0.6);
206+
}
207+
208+
:host(.textarea-disabled.has-focus.ion-valid) .textarea-bottom .helper-text,
209+
:host(.textarea-disabled.ion-touched.ion-invalid) .error-text,
210+
:host(.textarea-disabled.ion-color) .textarea-bottom .helper-text,
211+
:host(.textarea-disabled.ion-color) .helper-text {
212+
opacity: 0.6;
213+
}
214+
196215
// Textarea - Readonly
197216
// ----------------------------------------------------------------
198217

0 commit comments

Comments
 (0)