UNPKG

@selfcommunity/react-ui

Version:

React UI Components to integrate a Community created with SelfCommunity Platform.

15 lines (14 loc) 1.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const jsx_runtime_1 = require("react/jsx-runtime"); const material_1 = require("@mui/material"); function CourseUsersTableRowSkeleton(props) { const { header = false, animation = 'wave', editMode = false } = props; return ((0, jsx_runtime_1.jsx)(material_1.TableRow, { children: Array.from(new Array(editMode ? 4 : 5)).map((_, i, array) => { if (!editMode && i === array.length - 1) { return ((0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "14%" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: animation, variant: "rounded", width: "139px", height: "29px" }) }), i)); } return ((0, jsx_runtime_1.jsxs)(material_1.TableCell, Object.assign({ width: !editMode ? '20%' : '25%' }, { children: [!header && i === 0 && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", alignItems: "center", gap: "16px" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: animation, variant: "circular", width: "30px", height: "30px" }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: animation, variant: "text", width: "118px", height: "24px" })] }))), ((!header && i > 0) || header) && (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: animation, variant: "text", width: "78px", height: "24px" })] }), i)); }) })); } exports.default = CourseUsersTableRowSkeleton;