@selfcommunity/react-ui
Version: 
React UI Components to integrate a Community created with SelfCommunity Platform.
42 lines (35 loc) • 1.84 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const Widget_1 = tslib_1.__importDefault(require("../Widget"));
const material_1 = require("@mui/material");
const PollSnippet_1 = require("./PollSnippet");
const constants_1 = require("./constants");
const classes = {
    root: `${constants_1.PREFIX}-skeleton-root`,
    list: `${constants_1.PREFIX}-list`
};
const Root = (0, material_1.styled)(Widget_1.default, {
    name: constants_1.PREFIX,
    slot: 'SkeletonRoot'
})(() => ({}));
/**
 * > API documentation for the Community-JS Poll Suggestion Widget Skeleton component. Learn about the available props and the CSS API.
 #### Import
 ```jsx
 import {PollSuggestionWidgetSkeleton} from '@selfcommunity/react-ui';
 ```
 #### Component Name
 The name `SCPollSuggestionWidget-skeleton-root` can be used when providing style overrides in the theme.
 #### CSS
 |Rule Name|Global class|Description|
 |---|---|---|
 |root|.SCPollSuggestionWidget-skeleton-root|Styles applied to the root element.|
 |list|.SCPollSuggestionWidget-list|Styles applied to the list element.|
 *
 */
function PollSuggestionWidgetSkeleton(props) {
    return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, props, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: 120 }), (0, jsx_runtime_1.jsx)(material_1.List, Object.assign({ className: classes.list }, { children: [...Array(4)].map((user, index) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(PollSnippet_1.PollSnippetSkeleton, { elevation: 0 }) }, index))) }))] }) })));
}
exports.default = PollSuggestionWidgetSkeleton;