Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion apps/web-dashboard/src/components/AuthShell.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function AuthShell({
alternateTo,
alternateText,
children,
onModeClick,
}) {
return (
<div className="auth-shell">
Expand All @@ -17,7 +18,18 @@ function AuthShell({
<div className="auth-shell__content">
<div className="auth-form-card">
<div className="auth-form-card__header">
<span className="auth-form-card__mode">{modeLabel}</span>
{onModeClick ? (
<button
type="button"
className="auth-form-card__mode auth-form-card__mode--clickable"
onClick={onModeClick}
style={{ background: 'none', border: 'none', cursor: 'pointer', padding: 0 }}
>
{modeLabel}
</button>
) : (
<span className="auth-form-card__mode">{modeLabel}</span>
)}
{title ? <h1>{title}</h1> : null}
{subtitle ? <p>{subtitle}</p> : null}
</div>
Expand Down
15 changes: 15 additions & 0 deletions apps/web-dashboard/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,21 @@ select option {
text-transform: uppercase;
}

.auth-form-card__mode--clickable {
cursor: pointer;
transition: all 0.2s ease;
}

.auth-form-card__mode--clickable:hover {
background: var(--color-auth-mode-bg);
color: var(--color-primary);
text-decoration: underline;
}

.auth-form-card__mode--clickable:active {
opacity: 0.8;
}

.auth-form-card__header h1 {
margin-bottom: 0.4rem;
color: var(--color-auth-heading);
Expand Down
3 changes: 2 additions & 1 deletion apps/web-dashboard/src/pages/Signup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,13 @@ function Signup() {

return (
<AuthShell
modeLabel="Create account"
modeLabel="← Home / Create Account"
title=""
subtitle=""
alternateText="Already have access?"
alternateLabel="Sign in instead"
alternateTo="/login"
onModeClick={() => navigate('/')}
>
<form className="auth-form" onSubmit={handleSubmit}>
<button
Expand Down
Loading