mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 14:37:13 +01:00
27 lines
625 B
TypeScript
27 lines
625 B
TypeScript
import React from 'react'
|
|
import Required from './required'
|
|
|
|
export default function Input(props: {
|
|
label: string
|
|
name?: string
|
|
required?: boolean
|
|
children: React.ReactNode
|
|
}) {
|
|
const { label, name, required, children } = props
|
|
|
|
return (
|
|
<>
|
|
<div className="flex flex-wrap -mx-3 mb-2">
|
|
<div className="w-full px-3 mb-2">
|
|
<label
|
|
className="block uppercase tracking-wide text-gray-500 text-xs font-bold mb-2"
|
|
htmlFor={name}
|
|
>
|
|
{label} {required && <Required />}
|
|
</label>
|
|
{children}
|
|
</div>
|
|
</div>
|
|
</>
|
|
)
|
|
} |