@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
37 lines (30 loc) • 1.43 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box } 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`,
cover: `${PREFIX}-skeleton-cover`,
};
const Root = styled(Box, {
name: PREFIX,
slot: 'SkeletonRoot'
})(() => ({}));
/**
* > API documentation for the Community-JS Category AppBar Skeleton component. Learn about the available props and the CSS API.
#### Import
```jsx
import {CategoryHeaderSkeleton} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCCategoryHeader-skeleton-root` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCCategoryHeader-skeleton-root|Styles applied to the root element.|
*
*/
export default function CategoryHeaderSkeleton() {
return (_jsxs(Root, Object.assign({ className: classes.root }, { children: [_jsx(Skeleton, { sx: { height: 230 }, animation: "wave", variant: "rectangular", className: classes.cover }), _jsx(Box, { children: _jsx(Skeleton, { animation: "wave", sx: { height: 20, maxWidth: 300, width: '100%', margin: '0 auto' } }) }), _jsx(Box, { children: _jsx(Skeleton, { animation: "wave", sx: { height: 20, maxWidth: 300, width: '100%', margin: '0 auto' } }) })] })));
}