From ff5921d31cb1e6f34a503fc35b280ab0a984c22f Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Fri, 22 Jan 2021 15:07:49 -0800 Subject: [PATCH] fix(text-input): add missing warning field wrapper class --- docs/src/pages/components/TextInput.svx | 4 ++++ src/TextInput/TextInput.svelte | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/src/pages/components/TextInput.svx b/docs/src/pages/components/TextInput.svx index 9f6ced8f..326bc1b9 100644 --- a/docs/src/pages/components/TextInput.svx +++ b/docs/src/pages/components/TextInput.svx @@ -39,6 +39,10 @@ components: ["TextInput", "TextInputSkeleton"] +### Warning state + + + ### Disabled state diff --git a/src/TextInput/TextInput.svelte b/src/TextInput/TextInput.svelte index 47fdff59..0a4b0114 100644 --- a/src/TextInput/TextInput.svelte +++ b/src/TextInput/TextInput.svelte @@ -63,8 +63,8 @@ export let inline = false; import { getContext } from "svelte"; - import WarningFilled16 from "carbon-icons-svelte/lib/WarningFilled16"; - import WarningAltFilled16 from "carbon-icons-svelte/lib/WarningAltFilled16"; + import WarningFilled16 from "carbon-icons-svelte/lib/WarningFilled16/WarningFilled16.svelte"; + import WarningAltFilled16 from "carbon-icons-svelte/lib/WarningAltFilled16/WarningAltFilled16.svelte"; const ctx = getContext("Form"); @@ -127,6 +127,7 @@ data-invalid="{invalid || undefined}" data-warn="{warn || undefined}" class:bx--text-input__field-wrapper="{true}" + class:bx--text-input__field-wrapper--warning="{!invalid && warn}" > {#if invalid}