refactor(auth): replace anchor tags with fullghost Button variant for navigation links
This commit is contained in:
@@ -117,17 +117,15 @@ export default function ForgotPasswordPage({ onSubmit, onNavigate, currentUser =
|
||||
</Button>
|
||||
</form>
|
||||
|
||||
<div className={`mt-6 text-center transition-opacity duration-200 ${currentUser ? 'opacity-50 pointer-events-none' : ''}`}>
|
||||
<a
|
||||
href="#"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
if (!currentUser) onNavigate('login');
|
||||
}}
|
||||
className="text-sm text-neutral-900 hover:text-neutral-600 font-medium transition-colors duration-200 dark:text-white dark:hover:text-neutral-300"
|
||||
<div className={`mt-6 flex justify-center transition-opacity duration-200 ${currentUser ? 'opacity-50 pointer-events-none' : ''}`}>
|
||||
<Button
|
||||
type="button"
|
||||
variant="fullghost"
|
||||
disabled={!!currentUser}
|
||||
onClick={() => { if (!currentUser) onNavigate('login'); }}
|
||||
>
|
||||
← Retour à la connexion
|
||||
</a>
|
||||
</Button>
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
|
||||
@@ -164,7 +164,7 @@ export default function LoginPage({ onSubmit, onNavigate, onSetSessionCookie, re
|
||||
<div className={`mt-6 flex justify-center transition-opacity duration-200 ${currentUser ? 'opacity-50 pointer-events-none' : ''}`}>
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
variant="fullghost"
|
||||
disabled={!!currentUser}
|
||||
onClick={() => { if (!currentUser) onNavigate('register'); }}
|
||||
>
|
||||
|
||||
@@ -220,7 +220,7 @@ export default function RegisterPage({ onSubmit, onNavigate, currentUser = null
|
||||
<div className={`mt-6 flex justify-center transition-opacity duration-200 ${currentUser ? 'opacity-50 pointer-events-none' : ''}`}>
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
variant="fullghost"
|
||||
disabled={!!currentUser}
|
||||
onClick={() => { if (!currentUser) onNavigate('login'); }}
|
||||
>
|
||||
|
||||
@@ -138,14 +138,14 @@ export default function ResetPasswordPage({ onSubmit, onNavigate, email, token }
|
||||
</Button>
|
||||
</form>
|
||||
|
||||
<div className="mt-6 text-center">
|
||||
<a
|
||||
href="#"
|
||||
onClick={(e) => { e.preventDefault(); onNavigate('login'); }}
|
||||
className="text-sm text-neutral-900 hover:text-neutral-600 font-medium transition-colors duration-200 dark:text-white dark:hover:text-neutral-300"
|
||||
<div className="mt-6 flex justify-center">
|
||||
<Button
|
||||
type="button"
|
||||
variant="fullghost"
|
||||
onClick={() => onNavigate('login')}
|
||||
>
|
||||
← Retour à la connexion
|
||||
</a>
|
||||
</Button>
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
|
||||
@@ -22,6 +22,7 @@ const Button = ({
|
||||
secondary: 'bg-transparent border border-neutral-300 text-neutral-700 hover:bg-neutral-100 focus:ring-neutral-500/20 dark:bg-neutral-800/60 dark:border-neutral-700/50 dark:text-white dark:hover:bg-neutral-800/80 dark:focus:ring-neutral-600/20',
|
||||
danger: 'bg-red-700/10 border border-red-800/30 text-red-700 hover:bg-red-700/15 focus:ring-red-700/20 dark:bg-red-700/20 dark:border-red-600/20 dark:text-red-600 dark:hover:bg-red-600/30 dark:focus:ring-red-600/20',
|
||||
ghost: 'text-neutral-600 hover:text-neutral-900 hover:bg-neutral-100 focus:ring-neutral-500/20 dark:text-neutral-400 dark:hover:text-white dark:hover:bg-neutral-700/30 dark:focus:ring-neutral-600/20',
|
||||
fullghost: 'text-neutral-600 hover:text-neutral-900 focus:ring-neutral-500/20 dark:text-neutral-400 dark:hover:text-white dark:focus:ring-neutral-600/20',
|
||||
success: 'bg-green-700/10 border border-green-800/30 text-green-700 hover:bg-green-700/15 focus:ring-green-700/20 dark:bg-green-700/20 dark:border-green-600/20 dark:text-green-600 dark:hover:bg-green-600/30 dark:focus:ring-green-600/20',
|
||||
warning: 'bg-yellow-700/10 border border-yellow-800/30 text-yellow-700 hover:bg-yellow-700/15 focus:ring-yellow-700/20 dark:bg-yellow-700/20 dark:border-yellow-600/20 dark:text-yellow-600 dark:hover:bg-yellow-600/30 dark:focus:ring-yellow-600/20'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user