@veecode-platform/plugin-kong-service-manager
Version:
16 lines (13 loc) • 997 B
JavaScript
import React from 'react';
import { ListItem, Box } from '@material-ui/core';
import { LabelField } from '../Fields/Fields.esm.js';
import { Skeleton } from '@material-ui/lab';
import { useSkeletonStyles } from './styles.esm.js';
const SkeletonComponent = (props) => {
const { options } = props;
const { listItemWrapper, listItem, id, normal, tags } = useSkeletonStyles();
if (options.length <= 0) return null;
return /* @__PURE__ */ React.createElement(React.Fragment, null, options.map((option) => /* @__PURE__ */ React.createElement(ListItem, { key: option, className: listItemWrapper }, /* @__PURE__ */ React.createElement(Box, { className: listItem }, /* @__PURE__ */ React.createElement(LabelField, { title: option }), /* @__PURE__ */ React.createElement(Skeleton, { animation: "pulse", className: `${option.toLowerCase() === "id" && id} ${option.toLowerCase() === "tags" ? tags : normal}` })))));
};
export { SkeletonComponent };
//# sourceMappingURL=SkeletonComponent.esm.js.map