Skip to content

Commit 470c50d

Browse files
committed
feat: add "Forgot password?" and "Sign up" links to LoginModal; update Button and styles for link variant
1 parent 1d8182b commit 470c50d

File tree

6 files changed

+32
-5
lines changed

6 files changed

+32
-5
lines changed

src/components/Auth/LoginModal.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ export const LoginModal: React.FC = () => {
4949
Submit
5050
</Button>
5151
</div>
52+
<div className={styles.links}>
53+
<Button type='button' variant='link' onClick={() => console.log('Forgot password clicked')}>
54+
Forgot password?
55+
</Button>
56+
<Button type='button' variant='link' onClick={() => console.log('Sign up clicked')}>
57+
Sign up
58+
</Button>
59+
</div>
5260
</form>
5361
</Modal>
5462
)

src/components/Button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react'
22
import classNames from 'classnames'
33
import styles from '../../styles/components/Button/Button.module.scss'
44

5-
type ButtonVariant = 'primary' | 'secondary' | 'warning' | 'success' | 'danger' | 'outline'
5+
type ButtonVariant = 'primary' | 'secondary' | 'warning' | 'success' | 'danger' | 'outline' | 'link'
66

77
type ButtonProps = {
88
children: React.ReactNode

src/styles/components/Auth/LoginModal.module.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@
44
gap: 8px;
55
margin-top: 2.25rem;
66
}
7+
8+
.links {
9+
display: flex;
10+
justify-content: flex-end;
11+
margin-top: 1.5rem;
12+
}

src/styles/components/Button/Button.module.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,16 @@
6262
opacity: 0.6;
6363
cursor: not-allowed;
6464
}
65+
66+
.link {
67+
color: var(--text-color-link);
68+
text-decoration: none;
69+
font-size: 1rem;
70+
font-weight: var(--font-weight-normal);
71+
min-width: auto;
72+
}
73+
74+
.link:hover,
75+
.link:focus {
76+
color: var(--text-color-link-hover);
77+
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
.header {
22
background-color: var(--background-color-secondary);
3-
padding: 1rem 1.5rem;
3+
padding: 0 1.5rem;
44
display: flex;
55
align-items: center;
6-
border-bottom: 1px solid var(--border-color-opaque);
76
height: var(--header-desktop-height);
87
}

src/styles/themes/dark.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@
1313
--text-color-secondary: #cccccc;
1414
--text-color-tertiary: #000000;
1515
--text-color-link: #74a8dc;
16+
--text-color-link-hover: #49a4ff;;
1617
}
1718

1819
:root,
1920
[data-theme="dark"] {
20-
--button-primary-bg: #3d9dfe;
21+
--button-primary-bg: var(--border-color-primary);
2122
--button-primary-color: var(--text-color-tertiary);
22-
--button-primary-bg-hover: #49a4ff;
23+
--button-primary-bg-hover: var(--text-color-link-hover);
2324
--button-secondary-bg: var(--background-color-glow);
2425
--button-secondary-color: var(--text-color-primary);
2526
--button-secondary-bg-hover: #34397b;

0 commit comments

Comments
 (0)