first commit

This commit is contained in:
Romulus21
2024-02-10 14:59:46 +01:00
commit 5bb0b25673
193 changed files with 28660 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import React, {
FC, HTMLInputTypeAttribute,
ReactElement
} from "react"
const Field: FC<FieldProps> = ({children, type = 'text', className = '', classNameForm = '', ...props}) => {
return <div className={`form-control ${classNameForm}`}>
{children && <label className="block text-gray-900 dark:text-gray-200"
htmlFor={props.id ?? undefined}>
{children}
</label>}
<input className={`${className} w-full mt-2 rounded dark:bg-gray-700`}
type={type}
{...props}/>
<div className={`error-message`} />
</div>
}
export default Field
interface FieldProps {
children?: ReactElement|string,
type?: HTMLInputTypeAttribute,
name: string,
id?: string,
value: any,
placeholder?: string,
autoFocus?: boolean,
className?: string,
classNameForm?: string,
step?: string,
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void,
}