UNPKG

@selfcommunity/react-ui

Version:

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

44 lines (37 loc) 2.03 kB
"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 material_1 = require("@mui/material"); const Skeleton_1 = tslib_1.__importDefault(require("../Category/Skeleton")); const classnames_1 = tslib_1.__importDefault(require("classnames")); const constants_1 = require("./constants"); const classes = { root: `${constants_1.PREFIX}-skeleton-root`, categories: `${constants_1.PREFIX}-categories` }; const Root = (0, styles_1.styled)(material_1.Box, { name: constants_1.PREFIX, slot: 'SkeletonRoot' })(() => ({})); /** * > API documentation for the Community-JS Categories Skeleton component. Learn about the available props and the CSS API. #### Import ```jsx import {CategoriesSkeleton} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCCategories-skeleton-root` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCCategories-skeleton-root|Styles applied to the root element.| |categories|.SCCategories-categories|Styles applied to the categories' element.| * */ function CategoriesSkeleton(inProps) { const { className, CategorySkeletonProps = {} } = inProps, rest = tslib_1.__rest(inProps, ["className", "CategorySkeletonProps"]); return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, spacing: { xs: 3 }, className: classes.categories }, { children: [...Array(15)].map((category, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 6, md: 4 }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ elevation: 0, variant: 'outlined' }, CategorySkeletonProps)) }), index))) })) }))); } exports.default = CategoriesSkeleton;