@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
38 lines (31 loc) • 1.48 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box, Typography } from '@mui/material';
import { styled } from '@mui/material/styles';
import Skeleton from '@mui/material/Skeleton';
import { PREFIX } from './constants';
const classes = {
root: `${PREFIX}-skeleton-root`,
field: `${PREFIX}-field`
};
const Root = styled(Box, {
name: PREFIX,
slot: 'SkeletonRoot'
})(() => ({}));
/**
* > API documentation for the Community-JS User Profile Info Skeleton component. Learn about the available props and the CSS API.
#### Import
```jsx
import {UserProfileInfoSkeleton} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCUserProfileInfo-skeleton-root` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCUserProfileInfo-skeleton-root|Styles applied to the root element.|
*
*/
function UserProfileInfoSkeleton() {
return (_jsx(Root, Object.assign({ className: classes.root }, { children: Array.from({ length: 3 }).map((v, i) => (_jsxs(Box, Object.assign({ className: classes.field }, { children: [_jsx(Typography, Object.assign({ variant: "h6" }, { children: _jsx(Skeleton, { animation: "wave", sx: { height: 20, width: '50%' } }) })), _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(Skeleton, { animation: "wave", sx: { height: 20, width: '80%' } }) }))] }), i))) })));
}
export default UserProfileInfoSkeleton;