mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 14:37:13 +01:00
25 lines
532 B
TypeScript
25 lines
532 B
TypeScript
import React from 'react'
|
|
|
|
import InputWrapper from './inputWrapper'
|
|
|
|
type InputProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
label: string
|
|
}
|
|
|
|
export default function Input(props: InputProps) {
|
|
const { label, name, required, type = 'text', ...rest } = props
|
|
|
|
return (
|
|
<InputWrapper label={label} name={name} required={required}>
|
|
<input
|
|
type={type}
|
|
required={required}
|
|
className="input-text"
|
|
id={name}
|
|
name={name}
|
|
{...rest}
|
|
/>
|
|
</InputWrapper>
|
|
)
|
|
}
|