Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

[Style]: Make ShareProfile component responsive #1443

Merged
merged 1 commit into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Components/ShareIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'
function ShareIcon({ link, label, iconName }) {
return (
<a
className="mx-5"
className="mx-4 sm:mx-5"
href={link}
target="_blank"
rel="noopener noreferrer"
Expand Down
11 changes: 8 additions & 3 deletions src/Components/ShareProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export default function ShareProfile({ username }) {
})
}

document.querySelector('body').style.overflow = show ? 'hidden' : 'visible'

return (
<div className="flex justify-content-center">
<Toast ref={toast} />
Expand All @@ -41,7 +43,7 @@ export default function ShareProfile({ username }) {

<div
style={{ marginTop: '40vh', borderRadius: '1rem' }}
className="flex bg-white justify-content-center z-5 p-6 absolute mx-auto align-items-center"
className="flex bg-white justify-content-center z-5 absolute mx-auto align-items-center p-3 sm:p-6"
>
<ShareIcon
link={`https://www.facebook.com/sharer/sharer.php?u=${profileUrl}`}
Expand All @@ -54,17 +56,20 @@ export default function ShareProfile({ username }) {
iconName="twitter"
/>
<ShareIcon
link={`https://www.linkedin.com/sharing/share-offsite?url=${encodeURIComponent(profileUrl)}`}
link={`https://www.linkedin.com/sharing/share-offsite?url=${encodeURIComponent(
profileUrl,
)}`}
label="Share on LinkedIn"
iconName="linkedin"
/>
<a
className="mx-4 sm:mx-5"
role="button"
onClick={CopyLink}
aria-label="Copy link to profile"
>
<GetIcons
className="w-2rem h-2rem my-2rem cursor-pointer mx-5 share-icons copyLink"
className="w-2rem h-2rem my-2rem cursor-pointer share-icons copyLink"
iconName="link"
size={20}
/>
Expand Down