add imput composant
All checks were successful
All checks were successful
This commit is contained in:
parent
c348e2b2ac
commit
e13cb9bbb9
28
front/src/components/Input.astro
Normal file
28
front/src/components/Input.astro
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
import type { Input as Props } from 'types';
|
||||
|
||||
const { type, name, label, autocomplete, placeholder} = Astro.props;
|
||||
|
||||
---
|
||||
|
||||
<>
|
||||
{
|
||||
name && (
|
||||
<div class="mb-6">
|
||||
{label && (
|
||||
<label for={name} class="block text-sm font-medium">
|
||||
{label}
|
||||
</label>
|
||||
)}
|
||||
<input
|
||||
type={type}
|
||||
name={name}
|
||||
id={name}
|
||||
autocomplete={autocomplete}
|
||||
placeholder={placeholder}
|
||||
class="py-3 px-4 block w-full text-md rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-900"
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
</>
|
Loading…
x
Reference in New Issue
Block a user