@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
45 lines (38 loc) • 2.58 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const styles_1 = require("@mui/material/styles");
const constants_1 = require("./constants");
const Widget_1 = tslib_1.__importDefault(require("../Widget"));
const material_1 = require("@mui/material");
const Skeleton_1 = tslib_1.__importDefault(require("@mui/material/Skeleton"));
const classes = {
root: `${constants_1.PREFIX}-skeleton-root`,
title: `${constants_1.PREFIX}-skeleton-title`,
content: `${constants_1.PREFIX}-skeleton-content`,
actions: `${constants_1.PREFIX}-skeleton-actions`,
tutorial: `${constants_1.PREFIX}-skeleton-tutorial`
};
const Root = (0, styles_1.styled)(Widget_1.default, {
name: constants_1.PREFIX,
slot: 'SkeletonRoot'
})(() => ({}));
/**
* > API documentation for the Community-JS Platform Skeleton component. Learn about the available props and the CSS API.
#### Import
```jsx
import {PlatformWidgetSkeleton} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCPlatformWidget-skeleton-root` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCPlatformWidget-skeleton-root|Styles applied to the root element.|
*
*/
function PlatformWidgetSkeleton(props) {
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, props, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, justifyContent: "center", className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, className: classes.title }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", height: 25, width: 170 }) })), (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ item: true, xs: 12, className: classes.actions }, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", height: 35, width: 110 }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", height: 35, width: 110 }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", height: 35, width: 110 })] })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, justifyContent: "center", alignItems: "center", className: classes.tutorial }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { animation: "wave", variant: "circular", width: 25, height: 25 }) }))] })) })));
}
exports.default = PlatformWidgetSkeleton;