2017-07-18 04:46:32 +00:00
|
|
|
// @flow
|
2020-06-20 20:59:15 +00:00
|
|
|
import * as React from "react";
|
|
|
|
import styled from "styled-components";
|
2020-08-11 04:30:12 +00:00
|
|
|
import DelayedMount from "components/DelayedMount";
|
2020-06-20 20:59:15 +00:00
|
|
|
import Fade from "components/Fade";
|
2020-07-10 05:33:07 +00:00
|
|
|
import Flex from "components/Flex";
|
2021-07-15 19:26:34 +00:00
|
|
|
import PlaceholderText from "components/PlaceholderText";
|
2017-07-18 04:46:32 +00:00
|
|
|
|
2021-09-11 05:46:57 +00:00
|
|
|
export default function PlaceholderDocument({
|
|
|
|
includeTitle,
|
|
|
|
delay,
|
|
|
|
}: {
|
|
|
|
includeTitle?: boolean,
|
|
|
|
delay?: number,
|
|
|
|
}) {
|
|
|
|
const content = (
|
|
|
|
<>
|
|
|
|
<PlaceholderText delay={0.2} />
|
|
|
|
<PlaceholderText delay={0.4} />
|
|
|
|
<PlaceholderText delay={0.6} />
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
|
|
|
|
if (includeTitle === false) {
|
|
|
|
return (
|
|
|
|
<DelayedMount delay={delay}>
|
|
|
|
<Fade>
|
|
|
|
<Flex column auto>
|
|
|
|
{content}
|
|
|
|
</Flex>
|
|
|
|
</Fade>
|
|
|
|
</DelayedMount>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2017-07-18 04:46:32 +00:00
|
|
|
return (
|
2021-09-11 05:46:57 +00:00
|
|
|
<DelayedMount delay={delay}>
|
2020-08-11 04:30:12 +00:00
|
|
|
<Wrapper>
|
2021-09-11 05:46:57 +00:00
|
|
|
<Fade>
|
|
|
|
<Flex column auto>
|
|
|
|
<PlaceholderText height={34} maxWidth={70} />
|
|
|
|
<PlaceholderText delay={0.2} maxWidth={40} />
|
|
|
|
<br />
|
|
|
|
|
|
|
|
{content}
|
|
|
|
</Flex>
|
|
|
|
</Fade>
|
2020-08-11 04:30:12 +00:00
|
|
|
</Wrapper>
|
|
|
|
</DelayedMount>
|
2017-07-18 04:46:32 +00:00
|
|
|
);
|
2017-11-10 21:42:33 +00:00
|
|
|
}
|
2020-02-27 06:29:22 +00:00
|
|
|
|
|
|
|
const Wrapper = styled(Fade)`
|
|
|
|
display: block;
|
|
|
|
margin: 40px 0;
|
|
|
|
`;
|