Files
outline/app/components/List/Placeholder.tsx
Tom Moor bf45e97641 chore: Enforce type import consistency (#10968)
* Update types

* fix circular dep

* type imports

* lint type imports and --fix
2025-12-19 23:07:02 -05:00

31 lines
829 B
TypeScript

import times from "lodash/times";
import styled from "styled-components";
import Fade from "~/components/Fade";
import Flex from "~/components/Flex";
import type { Props as PlaceholderTextProps } from "~/components/PlaceholderText";
import PlaceholderText from "~/components/PlaceholderText";
type Props = {
count?: number;
className?: string;
header?: PlaceholderTextProps;
body?: PlaceholderTextProps;
};
const Placeholder = ({ count, className, header, body }: Props) => (
<Fade>
{times(count || 2, (index) => (
<Item key={index} className={className} column auto>
<PlaceholderText {...header} header delay={0.2 * index} />
<PlaceholderText {...body} delay={0.2 * index} />
</Item>
))}
</Fade>
);
const Item = styled(Flex)`
padding: 10px 0;
`;
export default Placeholder;