UNPKG

@selfcommunity/react-ui

Version:

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

45 lines (38 loc) 2.97 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { styled } from '@mui/material/styles'; import Skeleton from '@mui/material/Skeleton'; import Widget from '../Widget'; import { Button, CardActions, CardContent, Grid, Typography } from '@mui/material'; import { PREFIX } from './constants'; const classes = { root: `${PREFIX}-skeleton-root`, primary: `${PREFIX}-primary`, secondary: `${PREFIX}-secondary`, progressBar: `${PREFIX}-progress-bar`, action: `${PREFIX}-action` }; const Root = styled(Widget, { name: PREFIX, slot: 'SkeletonRoot' })(() => ({})); /** * > API documentation for the Community-JS Incubator Skeleton component. Learn about the available props and the CSS API. #### Import ```jsx import {IncubatorSkeleton} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCIncubator-skeleton-root` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCIncubator-skeleton-root|Styles applied to the root element.| |primary|.SCIncubator-primary|Styles applied to the primary text element.| |secondary|.SCIncubator-secondary|Styles applied to the secondary text element.| |progressBar|.SCIncubator-progress-bar|Styles applied to the progress bar section.| |action|.SCIncubator-action|Styles applied to the action button element.| * */ export default function IncubatorSkeleton(props) { return (_jsxs(Root, Object.assign({ className: classes.root }, props, { children: [_jsxs(CardContent, { children: [_jsx(Typography, Object.assign({ className: classes.primary }, { children: _jsx(Skeleton, { animation: "wave", height: 20, width: "40%", variant: "text" }) })), _jsxs(Typography, Object.assign({ className: classes.secondary }, { children: [_jsx(Skeleton, { animation: "wave", height: 10, width: "50%", variant: "text" }), _jsx(Skeleton, { animation: "wave", height: 10, width: "80%", variant: "text" })] })), _jsxs(Grid, Object.assign({ container: true, spacing: 1, className: classes.progressBar }, { children: [_jsx(Grid, Object.assign({ item: true, xs: 12, md: 12 }, { children: _jsx(Skeleton, { animation: "wave", height: 20, width: "100%", variant: "rectangular" }) })), _jsx(Grid, Object.assign({ item: true, xs: true }, { children: _jsx(Skeleton, { animation: "wave", height: 10, width: "100%", variant: "text" }) })), _jsx(Grid, Object.assign({ item: true, xs: true }, { children: _jsx(Skeleton, { animation: "wave", height: 10, width: "100%", variant: "text" }) })), _jsx(Grid, Object.assign({ item: true, xs: true }, { children: _jsx(Skeleton, { animation: "wave", height: 10, width: "100%", variant: "text" }) }))] }))] }), _jsx(CardActions, Object.assign({ className: classes.action }, { children: _jsx(Button, Object.assign({ disabled: true, variant: 'outlined', size: 'small' }, { children: _jsx(Skeleton, { animation: "wave", height: 20, width: 50, variant: "text" }) })) }))] }))); }