Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows use of html in label, or alternately overwriting it entirely. … #1096

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/lib/forms/FloatingLabelInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
export let size: 'small' | 'default' = 'default';
export let color: 'base' | 'green' | 'red' = 'base';
export let value: any = undefined;
export let label: string = '';

const divClasses = {
filled: 'relative',
Expand Down Expand Up @@ -76,7 +75,7 @@
<input {id} {...$$restProps} bind:value on:blur on:change on:click on:focus on:input on:keydown on:keypress on:keyup on:mouseenter on:mouseleave on:mouseover on:paste {...{ type }} placeholder=" " class={twMerge(inputClasses[style], inputColorClasses[color], inputSizes[style][size], $$props.classInput)} />

<label for={id} class={twMerge(labelClasses[style], labelColorClasses[color], labelSizes[style][size], $$props.classLabel)}>
{label}
<slot />
</label>
</div>

Expand Down