Skip to content

Commit 43010b9

Browse files
committed
TSJR-169 columns layout
1 parent 4b72b46 commit 43010b9

File tree

8 files changed

+45
-39
lines changed

8 files changed

+45
-39
lines changed

src/apps/profiles/src/member-profile/skills/MemberSkillsInfo.module.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
}
2626

2727
.skillsWrap {
28-
display: flex;
29-
flex-wrap: wrap;
30-
column-gap: $sp-1;
31-
row-gap: $sp-2;
28+
padding-bottom: $sp-8;
29+
30+
@include ltemd {
31+
padding-bottom: $sp-4;
32+
}
3233
}
3334
}

src/libs/shared/lib/components/collapsible-skills-list/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/libs/shared/lib/components/grouped-skills-ui/GroupedSkillsUI.module.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,13 @@
22

33
.skillsCategories {
44
flex: 1;
5+
columns: 3 auto;
6+
7+
@include xl {
8+
columns: 2 auto;
9+
}
10+
11+
@include ltelg {
12+
columns: 1 auto;
13+
}
514
}
Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,41 @@
11
import { FC } from 'react'
2-
import Masonry, { ResponsiveMasonry } from 'react-responsive-masonry'
32

43
import { UserSkill } from '~/libs/core'
54
import { SkillPill } from '~/libs/shared'
65

7-
import { CollapsibleSkillsList } from '../collapsible-skills-list'
6+
import { SkillsList } from '../skills-list'
87

98
import styles from './GroupedSkillsUI.module.scss'
109

1110
interface GroupedSkillsUIProps {
1211
groupedSkillsByCategory: { [key: string]: UserSkill[] }
1312
}
1413
const GroupedSkillsUI: FC<GroupedSkillsUIProps> = (props: GroupedSkillsUIProps) => (
15-
<ResponsiveMasonry
14+
<div
1615
className={styles.skillsCategories}
17-
columnsCountBreakPoints={{ 350: 1, 750: 2, 1368: 3 }}
1816
>
19-
<Masonry>
20-
{
21-
Object.keys(props.groupedSkillsByCategory)
22-
.map((categoryName: string) => (
17+
{
18+
Object.keys(props.groupedSkillsByCategory)
19+
.map((categoryName: string) => (
2320

24-
<CollapsibleSkillsList
25-
key={categoryName}
26-
header={categoryName}
27-
>
28-
{
29-
props.groupedSkillsByCategory[categoryName]
30-
.map((skill: UserSkill) => (
31-
<SkillPill
32-
skill={skill}
33-
key={skill.id}
34-
theme='catList'
35-
/>
36-
))
37-
}
38-
</CollapsibleSkillsList>
39-
))
40-
}
41-
</Masonry>
42-
</ResponsiveMasonry>
21+
<SkillsList
22+
key={categoryName}
23+
header={categoryName}
24+
>
25+
{
26+
props.groupedSkillsByCategory[categoryName]
27+
.map((skill: UserSkill) => (
28+
<SkillPill
29+
skill={skill}
30+
key={skill.id}
31+
theme='catList'
32+
/>
33+
))
34+
}
35+
</SkillsList>
36+
))
37+
}
38+
</div>
4339
)
4440

4541
export default GroupedSkillsUI

src/libs/shared/lib/components/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export * from './member-skill-editor'
66
export * from './skill-pill'
77
export * from './expandable-list'
88
export * from './grouped-skills-ui'
9-
export * from './collapsible-skills-list'
9+
export * from './skills-list'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
transition: opacity 0.3s ease-in-out;
4646
max-height: auto;
4747
opacity: 1;
48-
padding-left: $sp-8;
48+
padding-left: $sp-4;
4949
margin-top: $sp-1;
5050

5151
@include ltemd {
52-
padding-left: $sp-4;
52+
padding-left: $sp-2;
5353
}
5454
}
5555
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import { FC, ReactNode } from 'react'
22
import classNames from 'classnames'
33

4-
import styles from './CollapsibleSkillsList.module.scss'
4+
import styles from './SkillsList.module.scss'
55

6-
interface CollapsibleSkillsListProps {
6+
interface SkillsListProps {
77
children?: ReactNode[]
88
header?: ReactNode
99
containerClass?: string
1010
headerClass?: string
1111
contentClass?: string
1212
}
1313

14-
const CollapsibleSkillsList: FC<CollapsibleSkillsListProps> = (props: CollapsibleSkillsListProps) => (
14+
const SkillsList: FC<SkillsListProps> = (props: SkillsListProps) => (
1515
<div className={classNames(styles.container, props.containerClass)}>
1616
<div className={classNames(styles.header, props.headerClass)}>
1717
<div className={styles.title}>{props.header}</div>
@@ -26,4 +26,4 @@ const CollapsibleSkillsList: FC<CollapsibleSkillsListProps> = (props: Collapsibl
2626
</div>
2727
)
2828

29-
export default CollapsibleSkillsList
29+
export default SkillsList
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as SkillsList } from './SkillsList'

0 commit comments

Comments
 (0)