This commit is contained in:
@@ -166,6 +166,7 @@ export default function SignInForm() {
|
|||||||
type="email"
|
type="email"
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
defaultValue={formData.email}
|
defaultValue={formData.email}
|
||||||
|
autoComplete="username"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -182,6 +183,7 @@ export default function SignInForm() {
|
|||||||
placeholder="Min. 8 characters"
|
placeholder="Min. 8 characters"
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
defaultValue={formData.password}
|
defaultValue={formData.password}
|
||||||
|
autoComplete="current-password"
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
onClick={() => setShowPassword(!showPassword)}
|
onClick={() => setShowPassword(!showPassword)}
|
||||||
@@ -192,7 +194,6 @@ export default function SignInForm() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Hiển thị thông báo lỗi nếu có */}
|
|
||||||
{errorMsg && (
|
{errorMsg && (
|
||||||
<p className="text-sm text-red-500 font-medium">{errorMsg}</p>
|
<p className="text-sm text-red-500 font-medium">{errorMsg}</p>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ interface InputProps {
|
|||||||
success?: boolean;
|
success?: boolean;
|
||||||
error?: boolean;
|
error?: boolean;
|
||||||
hint?: string; // Optional hint text
|
hint?: string; // Optional hint text
|
||||||
|
autoComplete?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Input: FC<InputProps> = ({
|
const Input: FC<InputProps> = ({
|
||||||
@@ -32,6 +33,7 @@ const Input: FC<InputProps> = ({
|
|||||||
success = false,
|
success = false,
|
||||||
error = false,
|
error = false,
|
||||||
hint,
|
hint,
|
||||||
|
autoComplete
|
||||||
}) => {
|
}) => {
|
||||||
// Determine input styles based on state (disabled, success, error)
|
// 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}`;
|
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}
|
step={step}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
className={inputClasses}
|
className={inputClasses}
|
||||||
|
autoComplete={autoComplete}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Optional Hint Text */}
|
{/* Optional Hint Text */}
|
||||||
|
|||||||
Reference in New Issue
Block a user