@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
41 lines (34 loc) • 2 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { styled } from '@mui/material/styles';
import { PREFIX } from './constants';
import Widget from '../Widget';
import { Grid } from '@mui/material';
import Skeleton from '@mui/material/Skeleton';
const classes = {
root: `${PREFIX}-skeleton-root`,
title: `${PREFIX}-skeleton-title`,
content: `${PREFIX}-skeleton-content`,
actions: `${PREFIX}-skeleton-actions`,
tutorial: `${PREFIX}-skeleton-tutorial`
};
const Root = styled(Widget, {
name: PREFIX,
slot: 'SkeletonRoot'
})(() => ({}));
/**
* > API documentation for the Community-JS Platform Skeleton component. Learn about the available props and the CSS API.
#### Import
```jsx
import {PlatformWidgetSkeleton} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCPlatformWidget-skeleton-root` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCPlatformWidget-skeleton-root|Styles applied to the root element.|
*
*/
export default function PlatformWidgetSkeleton(props) {
return (_jsx(Root, Object.assign({ className: classes.root }, props, { children: _jsxs(Grid, Object.assign({ container: true, justifyContent: "center", className: classes.content }, { children: [_jsx(Grid, Object.assign({ item: true, xs: 12, className: classes.title }, { children: _jsx(Skeleton, { animation: "wave", height: 25, width: 170 }) })), _jsxs(Grid, Object.assign({ item: true, xs: 12, className: classes.actions }, { children: [_jsx(Skeleton, { animation: "wave", height: 35, width: 110 }), _jsx(Skeleton, { animation: "wave", height: 35, width: 110 }), _jsx(Skeleton, { animation: "wave", height: 35, width: 110 })] })), _jsx(Grid, Object.assign({ item: true, xs: 12, justifyContent: "center", alignItems: "center", className: classes.tutorial }, { children: _jsx(Skeleton, { animation: "wave", variant: "circular", width: 25, height: 25 }) }))] })) })));
}