This PR moves the entire project to Typescript. Due to the ~1000 ignores this will lead to a messy codebase for a while, but the churn is worth it – all of those ignore comments are places that were never type-safe previously. closes #1282
30 lines
661 B
TypeScript
30 lines
661 B
TypeScript
import { times } from "lodash";
|
|
import * as React from "react";
|
|
import styled from "styled-components";
|
|
import Fade from "~/components/Fade";
|
|
import Flex from "~/components/Flex";
|
|
import PlaceholderText from "~/components/PlaceholderText";
|
|
|
|
type Props = {
|
|
count?: number;
|
|
};
|
|
|
|
const ListPlaceHolder = ({ count }: Props) => {
|
|
return (
|
|
<Fade>
|
|
{times(count || 2, (index) => (
|
|
<Item key={index} column auto>
|
|
<PlaceholderText header delay={0.2 * index} />
|
|
<PlaceholderText delay={0.2 * index} />
|
|
</Item>
|
|
))}
|
|
</Fade>
|
|
);
|
|
};
|
|
|
|
const Item = styled(Flex)`
|
|
padding: 10px 0;
|
|
`;
|
|
|
|
export default ListPlaceHolder;
|