UNPKG

@selfcommunity/react-ui

Version:

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

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