Skip to content

Commit 05944a6

Browse files
committed
feat: add bodyClassName prop to SettingsContentLayout and apply topicsBottomSpacer style in TopicSettings
1 parent 603fb48 commit 05944a6

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/components/Layout/SettingsContentLayout/SettingsContentLayout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1+
import clsx from 'clsx'
12
import './settingsContentLayout.css'
23

34
type SettingsContentLayoutProps = {
45
title: string
56
description: string
67
children: React.ReactNode
78
actions?: React.ReactNode
9+
bodyClassName?: string
810
}
911

1012
export const SettingsContentLayout = ({
1113
title,
1214
description,
1315
actions,
1416
children,
17+
bodyClassName,
1518
}: SettingsContentLayoutProps) => {
1619
return (
1720
<div className="settingsContent">
@@ -23,7 +26,7 @@ export const SettingsContentLayout = ({
2326

2427
{actions && <div className="actions">{actions}</div>}
2528
</header>
26-
<main className="settingsBody scrollable">{children}</main>
29+
<main className={clsx('settingsBody scrollable', bodyClassName)}>{children}</main>
2730
</div>
2831
)
2932
}

src/components/Layout/SettingsContentLayout/settingsContentLayout.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@
6363
cursor: pointer;
6464
}
6565
}
66+
67+
.topicsBottomSpacer {
68+
margin-bottom: 80px;
69+
padding-bottom: 24px;
70+
}
6671
.settingsContent header {
6772
display: flex;
6873
justify-content: space-between;

src/features/settings/components/TopicSettings.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export const TopicSettings = () => {
5959

6060
return (
6161
<SettingsContentLayout
62+
bodyClassName="topicsBottomSpacer"
6263
title="Followed Topics"
6364
description={`Your feed will be tailored by following the technologies you are interested in.`}>
6465
{userSelectedTags.length > 0 ? (

0 commit comments

Comments
 (0)