-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from daodaoedu/dev
merge dev branch to prod
- Loading branch information
Showing
7 changed files
with
267 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { Skeleton } from '@mui/material'; | ||
import { | ||
StyledContainer, | ||
StyledFooter, | ||
StyledGroupCard, | ||
StyledInfo, | ||
StyledText, | ||
} from './GroupCard.styled'; | ||
|
||
function SkeletonGroupCard() { | ||
return ( | ||
<StyledGroupCard href="#" sx={{ cursor: 'default' }}> | ||
<Skeleton variant="rounded" width="100%" height={122} animation="wave" /> | ||
<StyledContainer> | ||
<Skeleton | ||
variant="text" | ||
width="100%" | ||
fontSize="14px" | ||
animation="wave" | ||
/> | ||
<StyledInfo> | ||
<StyledText> | ||
<Skeleton | ||
variant="text" | ||
width="60%" | ||
fontSize="64px" | ||
animation="wave" | ||
/> | ||
</StyledText> | ||
<StyledText> | ||
<Skeleton | ||
variant="text" | ||
width="52.8%" | ||
fontSize="12px" | ||
animation="wave" | ||
/> | ||
</StyledText> | ||
</StyledInfo> | ||
<StyledText lineClamp="2" fontSize="14px" style={{ minHeight: '28px' }}> | ||
<Skeleton | ||
variant="text" | ||
fontSize="12px" | ||
width="100%" | ||
animation="wave" | ||
/> | ||
<Skeleton | ||
variant="text" | ||
fontSize="12px" | ||
width="100%" | ||
animation="wave" | ||
/> | ||
</StyledText> | ||
<StyledFooter> | ||
<Skeleton | ||
sx={{ | ||
height: '32px', | ||
width: '52.8%', | ||
marginLeft: 'auto', | ||
}} | ||
variant="text" | ||
fontSize="12px" | ||
width="27.2%" | ||
animation="wave" | ||
/> | ||
</StyledFooter> | ||
</StyledContainer> | ||
</StyledGroupCard> | ||
); | ||
} | ||
|
||
export default SkeletonGroupCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import getShareApi from '@/utils/share'; | ||
import styled from '@emotion/styled'; | ||
import IconButton from '@mui/material/IconButton'; | ||
import { | ||
FaSquareFacebook, | ||
FaLine, | ||
FaLinkedin, | ||
FaSquareThreads, | ||
FaSquareXTwitter, | ||
FaShareFromSquare, | ||
} from 'react-icons/fa6'; | ||
|
||
const StyledShareButtonGroup = styled.div` | ||
display: flex; | ||
gap: 0.25rem; | ||
align-items: center; | ||
.share-text { | ||
font-size: 14px; | ||
color: #536166; | ||
} | ||
`; | ||
|
||
export default function ShareButtonGroup({ title, text, url, hashtag }) { | ||
const { | ||
hasNativeShare, | ||
nativeShare, | ||
facebookShare, | ||
lineShare, | ||
linkedinShare, | ||
threadsShare, | ||
xShare, | ||
} = getShareApi({ title, text, url, hashtag }); | ||
|
||
return ( | ||
<StyledShareButtonGroup> | ||
<span className="share-text">分享至</span> | ||
<IconButton size="small" onClick={facebookShare}> | ||
<FaSquareFacebook fill="#1877F2" /> | ||
</IconButton> | ||
<IconButton size="small" onClick={threadsShare}> | ||
<FaSquareThreads fill="#000" /> | ||
</IconButton> | ||
<IconButton size="small" onClick={lineShare}> | ||
<FaLine size={16} fill="#00B900" /> | ||
</IconButton> | ||
<IconButton size="small" onClick={linkedinShare}> | ||
<FaLinkedin fill="#0A66C2" /> | ||
</IconButton> | ||
<IconButton size="small" onClick={xShare}> | ||
<FaSquareXTwitter fill="#000" /> | ||
</IconButton> | ||
{hasNativeShare && ( | ||
<IconButton size="small" onClick={nativeShare}> | ||
<FaShareFromSquare size={16} /> | ||
</IconButton> | ||
)} | ||
</StyledShareButtonGroup> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.