forked from geturbackend/urBackend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuthShell.jsx
More file actions
57 lines (50 loc) · 1.58 KB
/
Copy pathAuthShell.jsx
File metadata and controls
57 lines (50 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { Link } from 'react-router-dom';
function AuthShell({
modeLabel,
title,
subtitle,
alternateLabel,
alternateTo,
alternateText,
children,
onModeClick,
}) {
return (
<div className="auth-shell">
<div className="auth-shell__ambient auth-shell__ambient--one" />
<div className="auth-shell__ambient auth-shell__ambient--two" />
<div className="auth-shell__content">
<div className="auth-form-card">
<div className="auth-form-card__brand">
<div className="auth-form-card__brand-mark">U</div>
<span className="auth-form-card__brand-text">urBackend</span>
</div>
<div className="auth-form-card__header">
{modeLabel && (
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>
{children}
<div className="auth-form-card__footer">
<span>{alternateText}</span>
<Link to={alternateTo}>{alternateLabel}</Link>
</div>
</div>
</div>
</div>
);
}
export default AuthShell;