This commit is contained in:
@@ -166,6 +166,7 @@ export default function SignInForm() {
|
||||
type="email"
|
||||
onChange={handleChange}
|
||||
defaultValue={formData.email}
|
||||
autoComplete="username"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -182,6 +183,7 @@ export default function SignInForm() {
|
||||
placeholder="Min. 8 characters"
|
||||
onChange={handleChange}
|
||||
defaultValue={formData.password}
|
||||
autoComplete="current-password"
|
||||
/>
|
||||
<span
|
||||
onClick={() => setShowPassword(!showPassword)}
|
||||
@@ -192,7 +194,6 @@ export default function SignInForm() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Hiển thị thông báo lỗi nếu có */}
|
||||
{errorMsg && (
|
||||
<p className="text-sm text-red-500 font-medium">{errorMsg}</p>
|
||||
)}
|
||||
|
||||
@@ -15,6 +15,7 @@ interface InputProps {
|
||||
success?: boolean;
|
||||
error?: boolean;
|
||||
hint?: string; // Optional hint text
|
||||
autoComplete?: string;
|
||||
}
|
||||
|
||||
const Input: FC<InputProps> = ({
|
||||
@@ -32,6 +33,7 @@ const Input: FC<InputProps> = ({
|
||||
success = false,
|
||||
error = false,
|
||||
hint,
|
||||
autoComplete
|
||||
}) => {
|
||||
// Determine input styles based on state (disabled, success, error)
|
||||
let inputClasses = `h-11 w-full rounded-lg border appearance-none px-4 py-2.5 text-sm shadow-theme-xs placeholder:text-gray-400 focus:outline-hidden focus:ring-3 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800 ${className}`;
|
||||
@@ -61,6 +63,7 @@ const Input: FC<InputProps> = ({
|
||||
step={step}
|
||||
disabled={disabled}
|
||||
className={inputClasses}
|
||||
autoComplete={autoComplete}
|
||||
/>
|
||||
|
||||
{/* Optional Hint Text */}
|
||||
|
||||
Reference in New Issue
Block a user