This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
2019-01-05 21:37:33 +00:00
|
|
|
// @flow
|
2020-06-20 20:59:15 +00:00
|
|
|
import * as React from "react";
|
|
|
|
import { times } from "lodash";
|
|
|
|
import styled from "styled-components";
|
|
|
|
import Mask from "components/Mask";
|
|
|
|
import Fade from "components/Fade";
|
2020-07-10 05:33:07 +00:00
|
|
|
import Flex from "components/Flex";
|
2019-01-05 21:37:33 +00:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
count?: number,
|
|
|
|
};
|
|
|
|
|
|
|
|
const Placeholder = ({ count }: Props) => {
|
|
|
|
return (
|
|
|
|
<Fade>
|
2020-08-09 01:53:11 +00:00
|
|
|
{times(count || 2, (index) => (
|
2019-01-05 21:37:33 +00:00
|
|
|
<Item key={index} column auto>
|
|
|
|
<Mask />
|
|
|
|
</Item>
|
|
|
|
))}
|
|
|
|
</Fade>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
const Item = styled(Flex)`
|
|
|
|
padding: 15px 0 16px;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default Placeholder;
|