UNPKG

@selfcommunity/react-ui

Version:

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

24 lines (23 loc) 1.37 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Icon, Stack, styled, Typography } from '@mui/material'; import { FormattedMessage } from 'react-intl'; import { memo } from 'react'; import classNames from 'classnames'; const PREFIX = 'SCEmptyStatus'; const classes = { root: `${PREFIX}-root`, box: `${PREFIX}-box`, rotatedBox: `${PREFIX}-rotated-box`, icon: `${PREFIX}-icon` }; const Root = styled(Stack, { name: PREFIX, slot: 'Root', overridesResolver: (_props, styles) => styles.root })(() => ({})); function EmptyStatus(props) { // PROPS const { icon, title, description, actions, className } = props; return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [_jsx(Stack, Object.assign({ className: classes.box }, { children: _jsx(Stack, Object.assign({ className: classes.rotatedBox }, { children: _jsx(Icon, Object.assign({ className: classes.icon, color: "disabled", fontSize: "large" }, { children: icon })) })) })), _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: title, defaultMessage: title }) })), description && (_jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: description, defaultMessage: description }) }))), actions] }))); } export default memo(EmptyStatus);