Skip to content

Commit

Permalink
[DEV-19087] Added text to social links in contact card
Browse files Browse the repository at this point in the history
  • Loading branch information
fgyimah committed Feb 3, 2025
1 parent 5e3c694 commit 5287084
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/ContactCard/ContactCard.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
}

.linkText {
@include text-label;
@include link-primary;

overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand Down
5 changes: 5 additions & 0 deletions components/ContactCard/ContactCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ function ContactCard({ className, contactInfo, layout, renderAvatar, showAvatar,
{website && isCard && (
<a href={website.toString()} className={styles.link} title="Website">
<IconGlobe width={16} height={16} className={styles.icon} />
<span className={styles.linkText}>
{website.toString().replace(/(^\w+:|^)\/\//, '')}
</span>
</a>
)}
{facebook && (
Expand All @@ -103,6 +106,7 @@ function ContactCard({ className, contactInfo, layout, renderAvatar, showAvatar,
title="Facebook"
>
<IconFacebook width={16} height={16} className={styles.icon} />
<span className={styles.linkText}>{facebook}</span>
</a>
)}
{twitter && (
Expand All @@ -112,6 +116,7 @@ function ContactCard({ className, contactInfo, layout, renderAvatar, showAvatar,
title="Twitter"
>
<IconTwitter width={16} height={16} className={styles.icon} />
<span className={styles.linkText}>{`@${twitter}`}</span>
</a>
)}
</div>
Expand Down

0 comments on commit 5287084

Please sign in to comment.