diff --git a/docs/docs/Form fields/input.md b/docs/docs/Form fields/input.md index f2d8c421..56702492 100644 --- a/docs/docs/Form fields/input.md +++ b/docs/docs/Form fields/input.md @@ -12,7 +12,6 @@ | placeholder | | `string` | temporary text that appears in an

input field before any input is entered | | name | ✓ | `string` | name of the form control | | id | | `string`| unique identifier | -| hint | | `string` | shows below the input | | disabled | | `boolean` | determines if an input is disabled | | list | | `string` | id of datalist (list of predefined values) | | min | | `number` | minimal value on numeric input | @@ -32,7 +31,8 @@ ### Slots -This component does not have any slots. +- `hint` + - renders below the input field ### Methods - `reportValidity` diff --git a/packages/lib/src/form-fields/input.wc.svelte b/packages/lib/src/form-fields/input.wc.svelte index 41944307..d0f8315d 100644 --- a/packages/lib/src/form-fields/input.wc.svelte +++ b/packages/lib/src/form-fields/input.wc.svelte @@ -1,7 +1,7 @@ { return class extends customElementConstructor { static formAssociated = true; @@ -21,7 +21,6 @@ export let attachedInternals: ElementInternals; export let value: string = ''; export let label: string = 'Label'; - export let hint: string = ''; export let required: boolean = false; export let disabled: boolean = false; export let readonly: boolean = false; @@ -91,7 +90,7 @@ } -
+
- {#if hint} - - {@html hint} - + {#if $$slots.hint} +
+ +
{/if}