Refactor additionalClass parameter to be className for clarity
This commit is contained in:
@@ -57,4 +57,4 @@
|
||||
<TextAreaInput autocomplete="off" bind:value={valueObject[selectedLang]} height={"20"} onInput={() => {
|
||||
updateValue()
|
||||
onInput()
|
||||
}} additionalClass={className} />
|
||||
}} className={className} />
|
||||
@@ -1,5 +1,5 @@
|
||||
<input
|
||||
class={"border border-darkborderc focus:border-borderc rounded-md shadow-sm text-textcolor bg-transparent numinput focus:ring-borderc focus:ring-2 focus:outline-none transition-colors duration-200" + ((additionalClass) ? (' ' + additionalClass) : '')}
|
||||
class={"border border-darkborderc focus:border-borderc rounded-md shadow-sm text-textcolor bg-transparent numinput focus:ring-borderc focus:ring-2 focus:outline-none transition-colors duration-200" + ((className) ? (' ' + className) : '')}
|
||||
class:text-sm={size === 'sm'}
|
||||
class:text-md={size === 'md'}
|
||||
class:text-lg={size === 'lg'}
|
||||
@@ -31,7 +31,7 @@
|
||||
export let fullwidth = false
|
||||
export let fullh = false
|
||||
export let onChange = () => {}
|
||||
export let additionalClass = ''
|
||||
export let className = ''
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -32,15 +32,15 @@
|
||||
</div>
|
||||
|
||||
{#if (value === null || value === undefined)}
|
||||
<TextInput value={"Using default"} additionalClass="flex-1" disabled/>
|
||||
<TextInput value={"Using default"} className="flex-1" disabled/>
|
||||
{:else if typeof(value) === 'string'}
|
||||
<TextInput bind:value={value} additionalClass="flex-1"/>
|
||||
<TextInput bind:value={value} className="flex-1"/>
|
||||
{:else if typeof(value) === 'number'}
|
||||
<NumberInput bind:value={value} additionalClass="flex-1"/>
|
||||
<NumberInput bind:value={value} className="flex-1"/>
|
||||
{:else if typeof(value) === 'boolean'}
|
||||
<button class="px-2 py-2 border border-darkborderc flex-1" class:text-textcolor2={!value} on:click={valToggle}>True</button>
|
||||
<button class="px-2 py-2 border border-darkborderc flex-1" class:text-textcolor2={value} on:click={valToggle}>False</button>
|
||||
{:else}
|
||||
<TextInput value={"Using default"} additionalClass="flex-1" disabled/>
|
||||
<TextInput value={"Using default"} className="flex-1" disabled/>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -1,6 +1,6 @@
|
||||
{#if optimaizedInput}
|
||||
<textarea
|
||||
class={"border border-darkborderc n-scroll focus:border-borderc resize-none rounded-md shadow-sm text-textcolor bg-transparent focus:ring-borderc focus:ring-2 focus:outline-none transition-colors duration-200" + ((additionalClass) ? (' ' + additionalClass) : '')}
|
||||
class={"border border-darkborderc n-scroll focus:border-borderc resize-none rounded-md shadow-sm text-textcolor bg-transparent focus:ring-borderc focus:ring-2 focus:outline-none transition-colors duration-200" + ((className) ? (' ' + className) : '')}
|
||||
class:text-sm={size === 'sm'}
|
||||
class:text-md={size === 'md'}
|
||||
class:text-lg={size === 'lg'}
|
||||
@@ -37,7 +37,7 @@
|
||||
/>
|
||||
{:else}
|
||||
<textarea
|
||||
class={"border border-darkborderc n-scroll focus:border-borderc resize-none rounded-md shadow-sm text-textcolor bg-transparent focus:ring-borderc focus:ring-2 focus:outline-none transition-colors duration-200" + ((additionalClass) ? (' ' + additionalClass) : '')}
|
||||
class={"border border-darkborderc n-scroll focus:border-borderc resize-none rounded-md shadow-sm text-textcolor bg-transparent focus:ring-borderc focus:ring-2 focus:outline-none transition-colors duration-200" + ((className) ? (' ' + className) : '')}
|
||||
class:text-sm={size === 'sm'}
|
||||
class:text-md={size === 'md'}
|
||||
class:text-lg={size === 'lg'}
|
||||
@@ -74,7 +74,7 @@
|
||||
export let onInput = () => {}
|
||||
export let fullwidth = false
|
||||
export let height:'20'|'24'|'32'|'full' = '20'
|
||||
export let additionalClass = ''
|
||||
export let className = ''
|
||||
export let optimaizedInput = true
|
||||
let inpa = 0
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<input
|
||||
class={"border border-darkborderc focus:border-borderc rounded-md shadow-sm text-textcolor bg-transparent focus:ring-borderc focus:ring-2 focus:outline-none transition-colors duration-200" + ((additionalClass) ? (' ' + additionalClass) : '')}
|
||||
class={"border border-darkborderc focus:border-borderc rounded-md shadow-sm text-textcolor bg-transparent focus:ring-borderc focus:ring-2 focus:outline-none transition-colors duration-200" + ((className) ? (' ' + className) : '')}
|
||||
class:text-sm={size === 'sm'}
|
||||
class:text-md={size === 'md'}
|
||||
class:text-lg={size === 'lg'}
|
||||
@@ -39,6 +39,6 @@
|
||||
export let onInput = () => {}
|
||||
export let fullwidth = false
|
||||
export let fullh = false
|
||||
export let additionalClass = ''
|
||||
export let className = ''
|
||||
export let disabled = false
|
||||
</script>
|
||||
@@ -37,9 +37,9 @@
|
||||
<div class="w-full flex justify-center mt-4">
|
||||
<div class="flex w-2xl max-w-full items-center">
|
||||
{#if $SizeStore.w < 768}
|
||||
<TextInput additionalClass="flex-grow min-w-0" placeholder="Search" bind:value={search} />
|
||||
<TextInput className="flex-grow min-w-0" placeholder="Search" bind:value={search} />
|
||||
{:else}
|
||||
<TextInput size="xl" additionalClass="flex-grow" placeholder="Search" bind:value={search} />
|
||||
<TextInput size="xl" className="flex-grow" placeholder="Search" bind:value={search} />
|
||||
|
||||
{/if}
|
||||
<button class="bg-darkbg h-14 w-14 min-w-14 rounded-lg ml-2 flex justify-center items-center hover:ring transition-shadow" on:click={() => {
|
||||
|
||||
Reference in New Issue
Block a user