UNPKG

@selfcommunity/react-ui

Version:

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

46 lines (39 loc) 2.44 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { styled } from '@mui/material/styles'; import { Button, CardActions, CardContent, Skeleton, Typography } from '@mui/material'; import Widget from '../Widget'; import { PREFIX } from './constants'; const classes = { root: `${PREFIX}-skeleton-root`, title: `${PREFIX}-title`, content: `${PREFIX}-content`, chip: `${PREFIX}-chip`, points: `${PREFIX}-points`, actions: `${PREFIX}-actions` }; const Root = styled(Widget, { name: 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.| * */ export default function LoyaltyProgramWidgetSkeleton() { return (_jsxs(Root, Object.assign({ className: classes.root }, { children: [_jsx(CardContent, Object.assign({ className: classes.content }, { children: _jsx(Typography, Object.assign({ className: classes.title }, { children: _jsx(Skeleton, { animation: "wave", height: 25, width: "40%", variant: "rectangular" }) })) })), _jsxs(CardActions, Object.assign({ className: classes.actions }, { children: [_jsxs(Typography, Object.assign({ className: classes.points }, { children: [_jsx(Skeleton, { animation: "wave", variant: "circular", width: 60, height: 30, className: classes.chip }), _jsx(Skeleton, { animation: "wave", height: 20, width: 90, variant: "rectangular" })] })), _jsx(Button, Object.assign({ disabled: true, variant: 'outlined', size: 'small' }, { children: _jsx(Skeleton, { animation: "wave", height: 20, width: 70, variant: "text" }) }))] }))] }))); }