mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-26 13:31:45 +00:00
refactor: refactor text field styles
This commit is contained in:
parent
cfbe698e68
commit
b8f25caf7e
1 changed files with 11 additions and 3 deletions
|
|
@ -10,7 +10,7 @@
|
||||||
export let error: string = '';
|
export let error: string = '';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="relative flex items-center justify-center">
|
<div>
|
||||||
<input
|
<input
|
||||||
class:error
|
class:error
|
||||||
bind:value
|
bind:value
|
||||||
|
|
@ -19,12 +19,11 @@
|
||||||
on:keyup
|
on:keyup
|
||||||
on:change
|
on:change
|
||||||
class:withIcon={icon}
|
class:withIcon={icon}
|
||||||
class="hover:border-sspsBlue w-full rounded-lg border border-2 bg-[#f8fafb] p-3 text-xl shadow-lg outline-none transition-colors duration-300"
|
|
||||||
use:typeAction
|
use:typeAction
|
||||||
{placeholder}
|
{placeholder}
|
||||||
/>
|
/>
|
||||||
{#if icon}
|
{#if icon}
|
||||||
<span class="absolute right-0 top-0 bottom-0 my-auto flex bg-transparent p-3">
|
<span>
|
||||||
<slot name="icon" />
|
<slot name="icon" />
|
||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
@ -35,6 +34,15 @@
|
||||||
input {
|
input {
|
||||||
@apply w-full;
|
@apply w-full;
|
||||||
}
|
}
|
||||||
|
div {
|
||||||
|
@apply relative flex items-center justify-center;
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
@apply hover:border-sspsBlue w-full rounded-lg border border-2 bg-[#f8fafb] p-3 text-xl shadow-lg outline-none transition-colors duration-300;
|
||||||
|
}
|
||||||
|
div span {
|
||||||
|
@apply absolute right-0 top-0 bottom-0 my-auto flex bg-transparent p-3;
|
||||||
|
}
|
||||||
.withIcon {
|
.withIcon {
|
||||||
@apply pr-14;
|
@apply pr-14;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue