Skip to content

Commit 42ba148

Browse files
committed
MP-275 social links update
1 parent 29e6e05 commit 42ba148

File tree

3 files changed

+77
-42
lines changed

3 files changed

+77
-42
lines changed

src/apps/profiles/src/member-profile/links/MemberLinks.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
width: 24px;
2626
height: 24px;
2727

28-
path {
28+
path:not([stroke-linecap]) {
2929
fill: #333333;
3030
}
3131
}

src/apps/profiles/src/member-profile/links/ModifyMemberLinksModal/ModifyMemberLinksModal.module.scss

Lines changed: 54 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,58 +27,88 @@
2727
align-items: center;
2828
justify-content: space-between;
2929

30-
& > div:nth-child(1) {
30+
&>div:nth-child(1) {
3131
margin-right: $sp-2;
32-
min-width: 100px;
32+
min-width: 150px;
3333
}
3434

35-
& > div:nth-child(2) {
35+
&>div:nth-child(2) {
3636
flex: 1;
3737
}
38+
}
3839

39-
.formCTAs {
40-
display: flex;
41-
align-items: center;
42-
margin-bottom: $sp-4;
43-
44-
svg {
45-
width: 32px;
46-
height: 32px;
47-
}
48-
}
40+
.formCTAs {
41+
margin-top: $sp-2;
4942
}
5043
}
5144

5245
.links {
53-
margin-bottom: $sp-15;
46+
margin-bottom: $sp-4;
47+
padding: $sp-4 0 $sp-2;
48+
border-bottom: 1px solid $black-20;
49+
50+
@include ltelg {
51+
display: flex;
52+
flex-direction: column;
53+
}
5454

5555
&.noLinks {
5656
margin-bottom: 0;
57+
padding: 0;
58+
border: none;
5759
}
5860

5961
.linkItemWrap {
6062
display: flex;
6163
align-items: center;
62-
justify-content: space-between;
64+
justify-content: flex-start;
6365
margin-bottom: $sp-2;
64-
border-radius: 8px;
65-
padding: $sp-2;
66-
border: 1px solid $black-10;
66+
67+
>svg {
68+
width: 24px;
69+
height: 24px;
70+
71+
path:not([stroke-linecap]) {
72+
fill: $black-100;
73+
}
74+
75+
}
6776

6877
.linkItem {
78+
border-radius: 4px;
79+
padding: $sp-2 $sp-4;
80+
border: 1px solid $black-40;
81+
flex: 1;
6982
display: flex;
7083
align-items: center;
84+
justify-content: space-between;
85+
margin-left: $sp-4;
7186

72-
p {
73-
@include ltelg {
87+
.linkLabelWrap {
88+
display: flex;
89+
flex-direction: column;
90+
align-items: flex-start;
91+
92+
small {
93+
font-size: 11px;
94+
line-height: 11px;
95+
font-weight: $font-weight-medium;
96+
color: $turq-160;
97+
margin-bottom: $sp-1;
98+
}
99+
100+
p {
74101
word-break: break-all;
75102
}
76103
}
77104

78-
svg {
79-
width: 16px;
80-
height: 16px;
81-
margin-right: $sp-2;
105+
button {
106+
padding-right: 0;
107+
108+
svg {
109+
width: 24px;
110+
height: 24px;
111+
}
82112
}
83113
}
84114
}

src/apps/profiles/src/member-profile/links/ModifyMemberLinksModal/ModifyMemberLinksModal.tsx

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ const ModifyMemberLinksModal: FC<ModifyMemberLinksModalProps> = (props: ModifyMe
166166
onClose={props.onClose}
167167
open
168168
size='lg'
169-
title='My Links'
169+
title='Social Links'
170170
buttons={(
171171
<div className={styles.modalButtons}>
172172
<Button
@@ -184,18 +184,24 @@ const ModifyMemberLinksModal: FC<ModifyMemberLinksModalProps> = (props: ModifyMe
184184
)}
185185
>
186186
<div className={styles.container}>
187+
<p>Provide links to your social accounts.</p>
188+
187189
<div className={classNames(styles.links, currentMemberLinks?.length ? '' : styles.noLinks)}>
188190
{
189191
currentMemberLinks?.map((trait: UserTrait) => (
190192
<div className={styles.linkItemWrap} key={`member-link-${trait.name}`}>
193+
{renderLinkIcon(trait.name)}
191194
<div className={styles.linkItem}>
192-
{renderLinkIcon(trait.name)}
193-
<p>{trait.url}</p>
195+
<div className={styles.linkLabelWrap}>
196+
<small>{trait.name}</small>
197+
<p>{trait.url}</p>
198+
</div>
199+
<Button
200+
size='lg'
201+
icon={IconOutline.TrashIcon}
202+
onClick={bind(handleRemoveLink, this, trait)}
203+
/>
194204
</div>
195-
<Button
196-
icon={IconOutline.TrashIcon}
197-
onClick={bind(handleRemoveLink, this, trait)}
198-
/>
199205
</div>
200206
))
201207
}
@@ -211,15 +217,15 @@ const ModifyMemberLinksModal: FC<ModifyMemberLinksModalProps> = (props: ModifyMe
211217
value={selectedLinkType}
212218
onChange={handleSelectedLinkTypeChange}
213219
name='linkType'
214-
label='Type *'
220+
label='Type'
215221
error={formErrors.selectedLinkType}
216222
placeholder='Select a link type'
217223
dirty
218224
/>
219225

220226
<InputText
221227
name='url'
222-
label='URL *'
228+
label='URL'
223229
error={formErrors.url}
224230
placeholder='Enter a URL'
225231
dirty
@@ -228,14 +234,13 @@ const ModifyMemberLinksModal: FC<ModifyMemberLinksModalProps> = (props: ModifyMe
228234
onChange={handleURLChange}
229235
value={selectedLinkURL}
230236
/>
231-
232-
<div className={styles.formCTAs}>
233-
<Button
234-
icon={IconOutline.PlusCircleIcon}
235-
onClick={handleFormAction}
236-
size='xl'
237-
/>
238-
</div>
237+
</div>
238+
<div className={styles.formCTAs}>
239+
<Button
240+
onClick={handleFormAction}
241+
secondary
242+
label='+ Additional Link'
243+
/>
239244
</div>
240245
</form>
241246
</div>

0 commit comments

Comments
 (0)