@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
38 lines (31 loc) • 1.63 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { Button, useTheme } from '@mui/material';
import { styled } from '@mui/material/styles';
import Skeleton from '@mui/material/Skeleton';
import BaseItem from '../../shared/BaseItem';
import { PREFIX } from './constants';
const classes = {
root: `${PREFIX}-skeleton-root`
};
const Root = styled(BaseItem, {
name: PREFIX,
slot: 'SkeletonRoot'
})(() => ({}));
/**
* > API documentation for the Community-JS Group Skeleton component. Learn about the available props and the CSS API.
#### Import
```jsx
import {GroupSkeleton} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCGroup-skeleton-root` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCGroup-skeleton-root|Styles applied to the root element.|
*
*/
export default function GroupSkeleton(props) {
const theme = useTheme();
return (_jsx(Root, Object.assign({ className: classes.root }, props, { image: _jsx(Skeleton, { animation: "wave", variant: "circular", width: theme.selfcommunity.group.avatar.sizeSmall, height: theme.selfcommunity.group.avatar.sizeSmall }), primary: _jsx(Skeleton, { animation: "wave", height: 10, width: 120, style: { marginBottom: 10 } }), secondary: _jsx(Skeleton, { animation: "wave", height: 10, width: 70, style: { marginBottom: 10 } }), actions: _jsx(Button, Object.assign({ size: "small", variant: "outlined", disabled: true }, { children: _jsx(Skeleton, { animation: "wave", height: 10, width: 30, style: { marginTop: 5, marginBottom: 5 } }) })) })));
}