import React, { FC, useMemo } from 'react'; import { Placeholder, PlaceholderProps } from '~/components/placeholders/Placeholder'; import styles from './styles.module.scss'; import { Group } from '~/components/containers/Group'; type Props = PlaceholderProps & { lines?: number; wordsLimit?: number; }; const Paragraph: FC = ({ lines = 3, wordsLimit = 12, ...props }) => { const iters = useMemo( () => [...new Array(lines)].map(() => [...new Array(Math.ceil(Math.random() * wordsLimit))].map((_, i) => i) ), [lines, wordsLimit] ); return ( {iters.map((words, i) => (
{words.map(word => ( ))}
))}
); }; export { Paragraph };