UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

30 lines (29 loc) 719 B
import { jsx as t } from "react/jsx-runtime"; import { useState as f, useEffect as l, Fragment as p } from "react"; import c from "@mui/material/Skeleton"; import { times as h } from "lodash-es"; function u({ numRows: e = 5, rowHeight: r, className: s }) { const [i, m] = f([]); return l(() => { const o = []; h(e, (n) => { o.push( /* @__PURE__ */ t(p, { children: /* @__PURE__ */ t( c, { height: r, width: n === e - 1 ? "35%" : "100%" } ) }, n) ); }), m(o); }, [e, r]), /* @__PURE__ */ t("div", { className: s, children: i }); } export { u as SkeletonParagraph }; //# sourceMappingURL=SkeletonParagraph.js.map