UNPKG

@selfcommunity/react-ui

Version:

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

38 lines (31 loc) 1.3 kB
import { __rest } from "tslib"; import { jsx as _jsx } from "react/jsx-runtime"; import { styled } from '@mui/material/styles'; import { CommentObjectSkeleton } from '../CommentObject'; import { Box } from '@mui/material'; import { PREFIX } from './constants'; const classes = { root: `${PREFIX}-skeleton-root` }; const Root = styled(Box, { name: PREFIX, slot: 'SkeletonRoot' })(() => ({})); /** * > API documentation for the Community-JS Comments Object Skeleton component. Learn about the available props and the CSS API. #### Import ```jsx import {CommentsObjectSkeleton} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCCommentsObject-skeleton-root` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCCommentsObject-skeleton-root|Styles applied to the root element.| * */ export default function CommentsObjectSkeleton(props) { const { count = 3, CommentObjectSkeletonProps = {} } = props, rest = __rest(props, ["count", "CommentObjectSkeletonProps"]); return (_jsx(Root, Object.assign({ className: classes.root }, rest, { children: [...Array(count)].map((comment, index) => (_jsx(CommentObjectSkeleton, Object.assign({}, CommentObjectSkeletonProps), index))) }))); }