-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WJ-111 - New: EntitySummary skeleton;
- Loading branch information
Lucas Teixeira
committed
Nov 8, 2020
1 parent
a40ff54
commit b1dc7a9
Showing
13 changed files
with
149 additions
and
60 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,31 @@ | ||
import React from 'react'; | ||
|
||
import { EntityImageLoading } from 'containers'; | ||
import { | ||
Container, | ||
ImageContainer, | ||
DetailsContainer, | ||
} from 'containers/EntitySummary/styles'; | ||
import { | ||
ShortLabelSkeleton, | ||
MediumLabelSkeleton, | ||
LongLabelSkeleton, | ||
} from './styles'; | ||
|
||
const EntitySummaryLoading: React.FC<any> = ({ size }) => { | ||
return ( | ||
<Container> | ||
<ImageContainer> | ||
<EntityImageLoading size={size} /> | ||
</ImageContainer> | ||
<DetailsContainer> | ||
<MediumLabelSkeleton /> | ||
<ShortLabelSkeleton /> | ||
<LongLabelSkeleton /> | ||
<MediumLabelSkeleton /> | ||
</DetailsContainer> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default EntitySummaryLoading; |
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,28 @@ | ||
import styled from 'styled-components'; | ||
|
||
import { Size } from 'shared/enums'; | ||
import { Skeleton } from 'components'; | ||
|
||
export const ShortLabelSkeleton = styled(Skeleton)` | ||
height: ${Size.Default}; | ||
width: 15%; | ||
border-radius: ${Size.Largest}; | ||
margin-bottom: ${Size.Default}; | ||
`; | ||
|
||
export const MediumLabelSkeleton = styled(Skeleton)` | ||
height: ${Size.Default}; | ||
width: 30%; | ||
border-radius: ${Size.Largest}; | ||
margin-bottom: ${Size.Smallest}; | ||
`; | ||
|
||
export const LongLabelSkeleton = styled(Skeleton)` | ||
height: ${Size.Default}; | ||
width: 90%; | ||
border-radius: ${Size.Default}; | ||
margin-bottom: ${Size.Smallest}; | ||
`; |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export default interface ContainerProps { | ||
mediaType?: number; | ||
size?: string; | ||
} |
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,16 @@ | ||
import React from 'react'; | ||
|
||
import ContainerProps from 'containers/EntityImage/types/ContainerProps'; | ||
import { EntitySummaryLoading } from 'containers'; | ||
import { Container } from './styles'; | ||
|
||
const EntitySummaryListLoading: React.FC<ContainerProps> = ({ size }) => { | ||
return ( | ||
<Container> | ||
<EntitySummaryLoading size={size} /> | ||
<EntitySummaryLoading size={size} /> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default EntitySummaryListLoading; |
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,26 @@ | ||
import styled from 'styled-components'; | ||
|
||
import { Color } from 'shared/enums'; | ||
import { getBackground } from 'shared/helpers'; | ||
import { Container as ContainerDefault } from 'containers/EntitySummaryList/styles'; | ||
|
||
export const Container = styled<any>(ContainerDefault)` | ||
position: relative; | ||
overflow-x: hidden; | ||
&::before { | ||
content: ''; | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
z-index: 10; | ||
background: linear-gradient( | ||
to bottom, | ||
${Color.Transparent} 0%, | ||
${Color.Transparent} 40%, | ||
${props => getBackground(props.theme, props.background, Color.Fill)} 90%, | ||
${props => getBackground(props.theme, props.background, Color.Fill)} 100% | ||
); | ||
} | ||
`; |
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 |
---|---|---|
@@ -1,7 +1,28 @@ | ||
import styled from 'styled-components'; | ||
import { Color, Size } from 'shared/enums'; | ||
|
||
export const Container = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
`; | ||
|
||
export const EmptyContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
padding: ${Size.Large}; | ||
`; | ||
export const EmptyImage = styled.div` | ||
svg { | ||
max-height: 200px; | ||
width: 100%; | ||
} | ||
`; | ||
export const EmptyLabel = styled.div` | ||
margin-top: ${Size.Default}; | ||
font-size: ${Size.Medium}; | ||
color: ${Color.Text}; | ||
text-align: center; | ||
`; |
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
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