mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 22:47:15 +01:00
refactor form input fields
This commit is contained in:
committed by
Thomas Ruoff
parent
0ed66962ba
commit
b92ff0e3d8
17
components/wizard/input.tsx
Normal file
17
components/wizard/input.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import React from 'react'
|
||||
|
||||
import InputWrapper from './inputWrapper'
|
||||
|
||||
interface InputProps extends React.InputHTMLAttributes<T> {
|
||||
label: string
|
||||
}
|
||||
|
||||
export default function Input(props: InputProps) {
|
||||
const { label, required, type = 'text', ...rest } = props
|
||||
|
||||
return (
|
||||
<InputWrapper label="label" required={required}>
|
||||
<input type={type} required={required} className="input-text" {...rest} />
|
||||
</InputWrapper>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user