UNPKG

@selfcommunity/react-ui

Version:

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

35 lines (28 loc) 1.39 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { useTheme } from '@mui/material'; import { styled } from '@mui/material/styles'; import Skeleton from '@mui/material/Skeleton'; import BaseItem from '../../../shared/BaseItem'; const PREFIX = 'SCPollSnippetSkeleton'; const classes = { root: `${PREFIX}-root` }; const Root = styled(BaseItem)(({ theme }) => ({})); /** * > API documentation for the Community-JS Poll Snippet Skeleton component. Learn about the available props and the CSS API. #### Import ```jsx import {PollSnippetSkeleton} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCPollSnippetSkeleton` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCPollSnippetSkeleton-root|Styles applied to the root element.| * */ export default function PollSnippetSkeleton(props) { const theme = useTheme(); return (_jsx(Root, Object.assign({ className: classes.root }, props, { image: _jsx(Skeleton, { animation: "wave", variant: "circular", width: theme.selfcommunity.user.avatar.sizeMedium, height: theme.selfcommunity.user.avatar.sizeMedium }), primary: _jsx(Skeleton, { animation: "wave", height: 10, width: 120, style: { marginBottom: 10 } }), secondary: _jsx(Skeleton, { animation: "wave", height: 10, width: 70, style: { marginBottom: 10 } }) }))); }