Improve tablet mode Skeleton (#115)
This commit is contained in:
parent
28129ffdf1
commit
07fdec26e1
|
@ -52,6 +52,7 @@ export const CardVoteBlock = styled.div`
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: ${Colors.GrayLight};
|
background-color: ${Colors.GrayLight};
|
||||||
|
position: relative;
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
background-color: unset;
|
background-color: unset;
|
||||||
|
|
|
@ -6,9 +6,13 @@ import { Skeleton } from '../skeleton/Skeleton'
|
||||||
import { TagsSkeletonList } from '../skeleton/TagSkeleton'
|
import { TagsSkeletonList } from '../skeleton/TagSkeleton'
|
||||||
import { TextBlock } from '../skeleton/TextSkeleton'
|
import { TextBlock } from '../skeleton/TextSkeleton'
|
||||||
|
|
||||||
export const CommunitySkeleton = () => {
|
interface CommunitySkeletonProps {
|
||||||
|
customStyle?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export const CommunitySkeleton = ({ customStyle }: CommunitySkeletonProps) => {
|
||||||
return (
|
return (
|
||||||
<CardCommunityBlock>
|
<CardCommunityBlock className={customStyle ? 'notModal' : ''}>
|
||||||
{' '}
|
{' '}
|
||||||
<CardRow>
|
<CardRow>
|
||||||
<AvatarSkeleton />
|
<AvatarSkeleton />
|
||||||
|
@ -18,7 +22,7 @@ export const CommunitySkeleton = () => {
|
||||||
<TagsSkeleton />
|
<TagsSkeleton />
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</CardRow>
|
</CardRow>
|
||||||
<CardLinks>
|
<CardLinks className={customStyle ? 'notModal' : ''}>
|
||||||
<StyledExternalLink>Visit community</StyledExternalLink>
|
<StyledExternalLink>Visit community</StyledExternalLink>
|
||||||
<StyledExternalLink>Etherscan</StyledExternalLink>
|
<StyledExternalLink>Etherscan</StyledExternalLink>
|
||||||
<StyledInternalink>Voting history </StyledInternalink>
|
<StyledInternalink>Voting history </StyledInternalink>
|
||||||
|
@ -31,6 +35,10 @@ const CardRow = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 48px;
|
margin-bottom: 48px;
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
margin-bottom: 32px;
|
||||||
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
const CardContent = styled.div`
|
const CardContent = styled.div`
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const VotingCardSkeleton = () => {
|
||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<CardCommunityWrap>
|
<CardCommunityWrap>
|
||||||
<CommunitySkeleton />
|
<CommunitySkeleton customStyle={true} />
|
||||||
</CardCommunityWrap>
|
</CardCommunityWrap>
|
||||||
|
|
||||||
<CardVoteWrap>
|
<CardVoteWrap>
|
||||||
|
@ -22,7 +22,7 @@ export const VotingCardSkeleton = () => {
|
||||||
<Skeleton width="90px" height="16px" />
|
<Skeleton width="90px" height="16px" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Skeleton width="43px" height="8px" />
|
<RowCenter width="43px" height="8px" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>❓</span>
|
<span>❓</span>
|
||||||
|
@ -45,15 +45,31 @@ const CardHeader = styled.div`
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 54px;
|
margin-bottom: 54px;
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
const ProgressSkeleton = styled(Skeleton)`
|
const ProgressSkeleton = styled(Skeleton)`
|
||||||
height: 16px;
|
height: 16px;
|
||||||
margin: 12px 0 32px;
|
margin: 12px 0 32px;
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
width: 400px;
|
||||||
|
position: absolute;
|
||||||
|
top: 20px;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
const ButtonsRow = styled.div`
|
const ButtonsRow = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
margin-top: 32px;
|
||||||
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
const SkeletonButton = styled(Skeleton)`
|
const SkeletonButton = styled(Skeleton)`
|
||||||
|
@ -85,3 +101,11 @@ const Row = styled.div`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
const RowCenter = styled(Skeleton)`
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
Loading…
Reference in New Issue