UNPKG

@selfcommunity/react-ui

Version:

React UI Components to integrate a Community created with SelfCommunity Platform.

42 lines (35 loc) 1.89 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import ListItem from '@mui/material/ListItem'; import ListItemAvatar from '@mui/material/ListItemAvatar'; import ListItemText from '@mui/material/ListItemText'; import { styled } from '@mui/material/styles'; import Skeleton from '@mui/material/Skeleton'; import { useTheme } from '@mui/material'; import { PREFIX } from './constants'; const classes = { root: `${PREFIX}-skeleton-root`, list: `${PREFIX}-list` }; const Root = styled(ListItem, { name: PREFIX, slot: 'SkeletonRoot' })(() => ({})); /** * > API documentation for the Community-JS PrivateMessageSnippetItem Skeleton component. Learn about the available props and the CSS API. #### Import ```jsx import {PrivateMessageSnippetItemSkeleton} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCPrivateMessageSnippetItem-skeleton-root` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCPrivateMessageSnippetItem-skeleton-root|Styles applied to the root element.| |list|.SCPrivateMessageSnippetItem-list|Styles applied to the list element.| * */ export default function PrivateMessageSnippetItemSkeleton(props) { const theme = useTheme(); return (_jsxs(Root, Object.assign({ className: classes.root }, props, { secondaryAction: _jsx(Skeleton, { animation: "wave", height: 30, width: 5 }) }, { children: [_jsx(ListItemAvatar, { children: _jsx(Skeleton, { animation: "wave", variant: "circular", width: theme.selfcommunity.user.avatar.sizeMedium, height: theme.selfcommunity.user.avatar.sizeMedium }) }), _jsx(ListItemText, { primary: _jsx(Skeleton, { animation: "wave", height: 10, width: 120, style: { marginBottom: 10 } }), secondary: _jsx(Skeleton, { animation: "wave", height: 10, width: 70, style: { marginBottom: 10 } }) })] }))); }