From 6994deed900ba947fefb55ae0b7e8c85c60577e3 Mon Sep 17 00:00:00 2001 From: Kamil Murtaza Date: Wed, 2 Sep 2020 16:11:26 +0500 Subject: [PATCH 1/2] Fix missing required attribute on TextInput. --- src/TextInput/TextInput.svelte | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/TextInput/TextInput.svelte b/src/TextInput/TextInput.svelte index a46eac00..51c9724f 100644 --- a/src/TextInput/TextInput.svelte +++ b/src/TextInput/TextInput.svelte @@ -83,6 +83,12 @@ */ export let ref = null; + /** + * Set to `true` to mark the field as required + * @type {boolean} [required="false"] + */ + export let required = false; + import WarningFilled16 from "carbon-icons-svelte/lib/WarningFilled16"; $: errorId = `error-${id}`; @@ -129,6 +135,7 @@ {placeholder} {type} {value} + {required} class:bx--text-input={true} class:bx--text-input--light={light} class:bx--text-input--invalid={invalid} From a6a23f4c9884b2ba1a56f63a7cbed015ccf8d244 Mon Sep 17 00:00:00 2001 From: Kamil Murtaza Date: Fri, 4 Sep 2020 10:26:56 +0500 Subject: [PATCH 2/2] Minor Typo Fix --- src/TextInput/TextInput.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TextInput/TextInput.svelte b/src/TextInput/TextInput.svelte index 51c9724f..1d335021 100644 --- a/src/TextInput/TextInput.svelte +++ b/src/TextInput/TextInput.svelte @@ -85,7 +85,7 @@ /** * Set to `true` to mark the field as required - * @type {boolean} [required="false"] + * @type {boolean} [required=false] */ export let required = false;