UNPKG

@selfcommunity/react-ui

Version:

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

48 lines (41 loc) 2.61 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const jsx_runtime_1 = require("react/jsx-runtime"); const react_1 = tslib_1.__importDefault(require("react")); const styles_1 = require("@mui/material/styles"); const material_1 = require("@mui/material"); const Skeleton_1 = require("../Skeleton"); const classnames_1 = tslib_1.__importDefault(require("classnames")); const constants_1 = require("./constants"); const classes = { root: `${constants_1.PREFIX}-skeleton-root`, left: `${constants_1.PREFIX}-left`, right: `${constants_1.PREFIX}-right` }; const Root = (0, styles_1.styled)(material_1.Grid, { name: constants_1.PREFIX, slot: 'SkeletonRoot' })(() => ({})); /** * > API documentation for the Community-JS Feed Skeleton component. Learn about the available props and the CSS API. #### Import ```jsx import {FeedSkeleton} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCFeed-skeleton-root` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCFeed-skeleton-root|Styles applied to the root element.| |left|.SCFeed-left|Styles applied to the left section.| |right|.SCFeed-right|Styles applied to the right section.| * */ function FeedSkeleton(props) { // PROPS const { children = ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.GenericSkeleton, { sx: { mb: 2 } }), (0, jsx_runtime_1.jsx)(Skeleton_1.GenericSkeleton, { sx: { mb: 2 } }), (0, jsx_runtime_1.jsx)(Skeleton_1.GenericSkeleton, { sx: { mb: 2 } })] })), sidebar = ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.GenericSkeleton, { sx: { mb: 2 } }), (0, jsx_runtime_1.jsx)(Skeleton_1.GenericSkeleton, { sx: { mb: 2 } })] })), className } = props; return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ container: true, spacing: 2, className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 7 }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: classes.left }, { children: children })) })), (0, jsx_runtime_1.jsx)(material_1.Hidden, Object.assign({ smDown: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 5 }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: classes.right }, { children: sidebar })) })) }))] }))); } exports.default = FeedSkeleton;