Initial commit
This commit is contained in:
28
src/components/Input.astro
Normal file
28
src/components/Input.astro
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
interface Props {
|
||||
label: string
|
||||
type?: "text" | "email" | "password" | "number"
|
||||
name: string
|
||||
required?: boolean
|
||||
placeholder?: string
|
||||
}
|
||||
|
||||
const {
|
||||
label,
|
||||
type = "text",
|
||||
name,
|
||||
required = false,
|
||||
placeholder,
|
||||
} = Astro.props
|
||||
---
|
||||
|
||||
<label class="flex flex-col">
|
||||
{label}
|
||||
<input
|
||||
class="input input-bordered"
|
||||
type={type}
|
||||
name={name}
|
||||
required={required}
|
||||
placeholder={placeholder}
|
||||
/>
|
||||
</label>
|
Reference in New Issue
Block a user