Files
martials.no/src/components/Input.astro

29 lines
430 B
Plaintext
Raw Normal View History

2024-09-25 22:20:47 +02:00
---
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>