Skip to content

Commit 8cb0daa

Browse files
Merge pull request #75 from topcoder-platform/PROD-1070_restyle-settings
PROD-1070 restyle settings - dev
2 parents cbdf21c + 9b55a02 commit 8cb0daa

File tree

9 files changed

+46
-40
lines changed

9 files changed

+46
-40
lines changed

src/header/utility-selectors/UtilitySelector/ProfileSelector/ProfileSelector.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { FC, useContext } from 'react'
22

3+
import { SETTINGS_TITLE } from '../../../../config'
34
import { profileContext, ProfileContextData } from '../../../../lib'
45
import '../../../../lib/styles/index.scss'
56

@@ -23,7 +24,7 @@ const ProfileSelector: FC<{}> = () => {
2324
return (
2425
<div className={styles['profile-selector']}>
2526
{!isLoggedIn && <ProfileNotLoggedIn />}
26-
{isLoggedIn && <ProfileLoggedIn />}
27+
{isLoggedIn && <ProfileLoggedIn settingsTitle={SETTINGS_TITLE} />}
2728
</div>
2829
)
2930
}

src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/ProfileLoggedIn.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ import {
1111
import { ProfilePanel } from './profile-panel'
1212
import styles from './ProfileLoggedIn.module.scss'
1313

14-
const ProfileLoggedIn: FC<{}> = () => {
14+
interface ProfileLoggedInProps {
15+
settingsTitle: string
16+
}
17+
18+
const ProfileLoggedIn: FC<ProfileLoggedInProps> = (props: ProfileLoggedInProps) => {
1519

1620
const { profile }: ProfileContextData = useContext(profileContext)
1721
const [profilePanelOpen, setProfilePanelOpen]: [boolean, Dispatch<SetStateAction<boolean>>] = useState<boolean>(false)
@@ -41,7 +45,12 @@ const ProfileLoggedIn: FC<{}> = () => {
4145
</div>
4246
)}
4347
</div>
44-
{profilePanelOpen && <ProfilePanel toggleProfilePanel={toggleProfilePanel} />}
48+
{profilePanelOpen && (
49+
<ProfilePanel
50+
settingsTitle={props.settingsTitle}
51+
toggleProfilePanel={toggleProfilePanel}
52+
/>
53+
)}
4554
</>
4655
)
4756
}

src/header/utility-selectors/UtilitySelector/ProfileSelector/profile-logged-in/profile-panel/ProfilePanel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { FC, useContext } from 'react'
22
import { Link } from 'react-router-dom'
33

4-
import { SETTINGS_TITLE } from '../../../../../../config'
54
import {
65
authUrlLogout,
76
profileContext,
@@ -13,6 +12,7 @@ import {
1312
import styles from './ProfilePanel.module.scss'
1413

1514
interface ProfilePanelProps {
15+
settingsTitle: string
1616
toggleProfilePanel: () => void
1717
}
1818

@@ -34,9 +34,9 @@ const ProfilePanel: FC<ProfilePanelProps> = (props: ProfilePanelProps) => {
3434
<Link
3535
className={styles.profile}
3636
onClick={() => props.toggleProfilePanel()}
37-
to={getPath(SETTINGS_TITLE)}
37+
to={getPath(props.settingsTitle)}
3838
>
39-
{SETTINGS_TITLE}
39+
{props.settingsTitle}
4040
</Link>
4141
<a href={authUrlLogout} className={styles.logout}>
4242
Log Out

src/lib/content-layout/ContentLayout.module.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
@include content-height;
55
padding: 0;
66
display: grid;
7-
background-color: $tc-white;
87
grid-template-columns: 1fr;
98
justify-content: center;
109

@@ -14,7 +13,6 @@
1413

1514
.content-inner {
1615
flex: 1;
17-
background-color: $tc-white;
1816
max-width: $xl-max-content;
1917
padding: 0;
2018
}

src/lib/content-layout/ContentLayout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ import styles from './ContentLayout.module.scss'
77

88
export interface ContentLayoutProps {
99
children?: ReactNode
10+
contentClass?: string
1011
title: string
1112
titleClass?: string
1213
}
1314

1415
const ContentLayout: FC<ContentLayoutProps> = (props: ContentLayoutProps) => {
1516

1617
return (
17-
<div className={classNames(styles.content)}>
18+
<div className={classNames(styles.content, props.contentClass)}>
1819

1920
<div className={styles['content-outer']}>
2021

src/lib/styles/_cards.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
.card-title {
1111
@include font-weight-semi-bold;
12+
@include font-barlow;
1213
text-transform: uppercase;
1314
}
14-
}
15+
}

src/utils/settings/Settings.module.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
.page-header {
1+
.content {
22
background: url('./profile-settings-background.svg');
3+
background-size: 100% 100%;
4+
}
5+
6+
.page-header {
37
padding: 48px 180px;
48

59
h1 {

src/utils/settings/Settings.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const Settings: FC<{}> = () => {
3131

3232
return (
3333
<ContentLayout
34+
contentClass={styles.content}
3435
title={SETTINGS_TITLE}
3536
titleClass={classNames('font-tc-white', styles['page-header'])}
3637
>
@@ -51,15 +52,15 @@ const Settings: FC<{}> = () => {
5152
<div className={styles['page-content']}>
5253

5354
<div className='card'>
54-
<span className='card-title'>
55-
Basic Information
56-
</span>
55+
<div className='card-title'>
56+
Basic Information
57+
</div>
5758
</div>
5859

5960
<div className='card'>
60-
<span className='card-title'>
61-
Reset Password
62-
</span>
61+
<div className='card-title'>
62+
Reset Password
63+
</div>
6364
</div>
6465

6566
</div>
Lines changed: 14 additions & 23 deletions
Loading

0 commit comments

Comments
 (0)