add Meteo part
This commit is contained in:
@@ -3,14 +3,14 @@ import React, {
|
||||
ReactElement
|
||||
} from "react"
|
||||
|
||||
const Field: FC<FieldProps> = ({children, type = 'text', ...props}) => {
|
||||
const Field: FC<FieldProps> = ({children, type = 'text', className = '', ...props}) => {
|
||||
|
||||
return <div className="form-control">
|
||||
{children && <label className="block text-gray-900 dark:text-gray-200"
|
||||
htmlFor={props.id ?? undefined}>
|
||||
{children}
|
||||
</label>}
|
||||
<input className="w-full mt-2 rounded dark:bg-gray-700"
|
||||
<input className={`${className} w-full mt-2 rounded dark:bg-gray-700`}
|
||||
type={type}
|
||||
{...props}/>
|
||||
<div className={`error-message`} />
|
||||
@@ -27,5 +27,7 @@ interface FieldProps {
|
||||
value: any,
|
||||
placeholder?: string,
|
||||
autoFocus?: boolean,
|
||||
className?: string,
|
||||
step?: string,
|
||||
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user