From 6e32574a3587ab2299e7a2918c8822405a2ff7fb Mon Sep 17 00:00:00 2001 From: Leonard Forsberg Date: Sun, 6 Oct 2024 19:02:14 +0200 Subject: [PATCH] fix: add missing fields to $$Props in FloatingLableInput --- src/lib/forms/FloatingLabelInput.svelte | 15 +++- .../component-data/FloatingLabelInput.json | 68 ++++++++++++++++--- 2 files changed, 72 insertions(+), 11 deletions(-) diff --git a/src/lib/forms/FloatingLabelInput.svelte b/src/lib/forms/FloatingLabelInput.svelte index 2c88b5c8e..dc3c1ea31 100644 --- a/src/lib/forms/FloatingLabelInput.svelte +++ b/src/lib/forms/FloatingLabelInput.svelte @@ -11,6 +11,9 @@ size?: 'small' | 'default'; color?: 'base' | 'green' | 'red'; value?: any; + classDiv?: string; + classInput?: string; + classLabel?: string; } export let id: $$Props['id'] = generateId(); @@ -19,6 +22,9 @@ export let size: NonNullable<$$Props['size']> = 'default'; export let color: NonNullable<$$Props['color']> = 'base'; export let value: $$Props['value'] = undefined; + export let classDiv: $$Props['classDiv'] = ''; + export let classInput: $$Props['classInput'] = ''; + export let classLabel: $$Props['classLabel'] = ''; const divClasses = { filled: 'relative', @@ -81,10 +87,10 @@ }; -
- +
+ -
@@ -99,4 +105,7 @@ @prop export let size: NonNullable<$$Props['size']> = 'default'; @prop export let color: NonNullable<$$Props['color']> = 'base'; @prop export let value: $$Props['value'] = undefined; +@prop export let classDiv: $$Props['classDiv'] = ''; +@prop export let classInput: $$Props['classInput'] = ''; +@prop export let classLabel: $$Props['classLabel'] = ''; --> diff --git a/src/routes/component-data/FloatingLabelInput.json b/src/routes/component-data/FloatingLabelInput.json index d4cada59e..c3c7d3f54 100644 --- a/src/routes/component-data/FloatingLabelInput.json +++ b/src/routes/component-data/FloatingLabelInput.json @@ -1,13 +1,65 @@ { "name": "FloatingLabelInput", "slots": [], - "events": ["blur", "change", "click", "focus", "input", "keydown", "keypress", "keyup", "mouseenter", "mouseleave", "mouseover", "paste"], + "events": [ + "blur", + "change", + "click", + "focus", + "input", + "keydown", + "keypress", + "keyup", + "mouseenter", + "mouseleave", + "mouseover", + "paste" + ], "props": [ - ["id?", "string", "generateId()"], - ["style?", "'filled' | 'outlined' | 'standard'", ""], - ["type?", "InputType", ""], - ["size?", "'small' | 'default'", ""], - ["color?", "'base' | 'green' | 'red'", ""], - ["value?", "any", "undefined"] + [ + "id?", + "string", + "generateId()" + ], + [ + "style?", + "'filled' | 'outlined' | 'standard'", + "" + ], + [ + "type?", + "InputType", + "" + ], + [ + "size?", + "'small' | 'default'", + "" + ], + [ + "color?", + "'base' | 'green' | 'red'", + "" + ], + [ + "value?", + "any", + "undefined" + ], + [ + "classDiv?", + "string", + "''" + ], + [ + "classInput?", + "string", + "''" + ], + [ + "classLabel?", + "string", + "''" + ] ] -} +} \ No newline at end of file