add form errors
This commit is contained in:
@@ -5,7 +5,7 @@ import React, {
|
||||
|
||||
const Field: FC<FieldProps> = ({children, type = 'text', ...props}) => {
|
||||
|
||||
return <div className="form-group">
|
||||
return <div className="form-control">
|
||||
{children && <label className="block text-gray-900 dark:text-gray-200"
|
||||
htmlFor={props.id ?? undefined}>
|
||||
{children}
|
||||
@@ -13,6 +13,7 @@ const Field: FC<FieldProps> = ({children, type = 'text', ...props}) => {
|
||||
<input className="w-full mt-2 rounded dark:bg-gray-700"
|
||||
type={type}
|
||||
{...props}/>
|
||||
<div className={`error-message`} />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user