@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
50 lines (43 loc) • 2.95 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 material_1 = require("@mui/material");
const Widget_1 = tslib_1.__importDefault(require("../Widget"));
const constants_1 = require("./constants");
const classes = {
root: `${constants_1.PREFIX}-skeleton-root`,
title: `${constants_1.PREFIX}-title`,
content: `${constants_1.PREFIX}-content`,
chip: `${constants_1.PREFIX}-chip`,
points: `${constants_1.PREFIX}-points`,
actions: `${constants_1.PREFIX}-actions`
};
const Root = (0, styles_1.styled)(Widget_1.default, {
name: constants_1.PREFIX,
slot: 'SkeletonRoot'
})(() => ({}));
/**
* > API documentation for the Community-JS Loyalty Program Widget Skeleton component. Learn about the available props and the CSS API.
#### Import
```jsx
import {LoyaltyProgramWidgetSkeleton} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCLoyaltyProgramWidget-skeleton-root` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCLoyaltyProgramWidget-skeleton-root|Styles applied to the root element.|
|title|.SCLoyaltyProgramWidget-title|Styles applied to the title element.|
|content|.SCLoyaltyProgramWidget-content|Styles applied to the card content section.|
|chip|.SCLoyaltyProgramWidget-chip|Styles applied to the card chip element.|
|points|.SCLoyaltyProgramWidget-points|Styles applied to the card actions points element.|
|actions|.SCLoyaltyProgramWidget-actions|Styles applied to the action section.|
*
*/
function LoyaltyProgramWidgetSkeleton() {
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: classes.root }, { children: [(0, jsx_runtime_1.jsx)(material_1.CardContent, Object.assign({ className: classes.content }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.title }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 25, width: "40%", variant: "rectangular" }) })) })), (0, jsx_runtime_1.jsxs)(material_1.CardActions, Object.assign({ className: classes.actions }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.points }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", variant: "circular", width: 60, height: 30, className: classes.chip }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: 90, variant: "rectangular" })] })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ disabled: true, variant: 'outlined', size: 'small' }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: 70, variant: "text" }) }))] }))] })));
}
exports.default = LoyaltyProgramWidgetSkeleton;