@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
23 lines (22 loc) • 1.16 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box, CardContent, CardHeader, Divider } from '@mui/material';
import Skeleton from '@mui/material/Skeleton';
import { styled } from '@mui/material/styles';
import Widget from '../Widget';
import { PREFIX } from './constants';
const classes = {
root: `${PREFIX}-skeleton-root`,
grid: `${PREFIX}-grid`,
media: `${PREFIX}-media`
};
const Root = styled(Widget, {
name: PREFIX,
slot: 'SkeletonRoot',
overridesResolver: (_props, styles) => styles.skeletonRoot
})(() => ({}));
export default function EventMediaWidgetSkeleton() {
return (_jsxs(Root, Object.assign({ className: classes.root }, { children: [_jsx(CardHeader, { title: _jsx(Skeleton, { animation: "wave", width: "50px", height: "23px" }) }), _jsx(Divider, {}), _jsx(CardContent, { children: _jsx(Box, Object.assign({ className: classes.grid }, { children: Array.from(Array(9)).map((_, i) => (_jsx(EventMediaSkeleton, {}, i))) })) })] })));
}
export function EventMediaSkeleton() {
return _jsx(Skeleton, { variant: "rectangular", animation: "wave", width: "100%", className: classes.media });
}