Skip to content

Commit

Permalink
removed label prop, added slot
Browse files Browse the repository at this point in the history
  • Loading branch information
kryptus36 committed Oct 3, 2023
1 parent dc5a76b commit 0f508db
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 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,9 +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)}>
<slot name='label'>
{@html label}
</slot>
<slot />
</label>
</div>

Expand Down

0 comments on commit 0f508db

Please sign in to comment.