Positioned document loading state with the document content
This commit is contained in:
@ -11,7 +11,7 @@ const randomValues = Array.from(
|
|||||||
() => `${randomInteger(85, 100)}%`
|
() => `${randomInteger(85, 100)}%`
|
||||||
);
|
);
|
||||||
|
|
||||||
export default () => {
|
export default (props: {}) => {
|
||||||
return (
|
return (
|
||||||
<ReactCSSTransitionGroup
|
<ReactCSSTransitionGroup
|
||||||
transitionName="fadeIn"
|
transitionName="fadeIn"
|
||||||
@ -22,7 +22,7 @@ export default () => {
|
|||||||
transitionEnterTimeout={0}
|
transitionEnterTimeout={0}
|
||||||
transitionLeaveTimeout={0}
|
transitionLeaveTimeout={0}
|
||||||
>
|
>
|
||||||
<Flex column auto>
|
<Flex column auto {...props}>
|
||||||
<Mask style={{ width: randomValues[0] }} header />
|
<Mask style={{ width: randomValues[0] }} header />
|
||||||
<Mask style={{ width: randomValues[1] }} />
|
<Mask style={{ width: randomValues[1] }} />
|
||||||
<Mask style={{ width: randomValues[2] }} />
|
<Mask style={{ width: randomValues[2] }} />
|
||||||
|
@ -137,7 +137,7 @@ type Props = {
|
|||||||
{this.state.isLoading && <LoadingIndicator />}
|
{this.state.isLoading && <LoadingIndicator />}
|
||||||
{isFetching &&
|
{isFetching &&
|
||||||
<CenteredContent>
|
<CenteredContent>
|
||||||
<PreviewLoading />
|
<LoadingState />
|
||||||
</CenteredContent>}
|
</CenteredContent>}
|
||||||
{!isFetching &&
|
{!isFetching &&
|
||||||
this.document &&
|
this.document &&
|
||||||
@ -208,6 +208,10 @@ const Container = styled(Flex)`
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const LoadingState = styled(PreviewLoading)`
|
||||||
|
margin: 80px 20px;
|
||||||
|
`;
|
||||||
|
|
||||||
const PagePadding = styled(Flex)`
|
const PagePadding = styled(Flex)`
|
||||||
padding: 80px 20px;
|
padding: 80px 20px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
Reference in New Issue
Block a user