@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
35 lines (34 loc) • 1.11 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { styled } from '@mui/material/styles';
import { Chip } from '@mui/material';
import { FormattedMessage } from 'react-intl';
import { useThemeProps } from '@mui/system';
import classNames from 'classnames';
const PREFIX = 'SCNotificationNewChip';
const classes = {
root: `${PREFIX}-root`
};
const Root = styled(Chip, {
name: PREFIX,
slot: 'Root',
overridesResolver: (props, styles) => [styles.root]
})(() => ({
marginRight: 3,
fontSize: 11,
padding: 3,
borderRadius: 3,
height: 20,
display: 'inline',
float: 'left'
}));
export default function NewChip(inProps) {
const props = useThemeProps({
props: inProps,
name: PREFIX
});
const { className = null } = props;
/**
* Renders root object
*/
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className), label: _jsx(FormattedMessage, { id: "ui.notification.notificationNewChip.label", defaultMessage: "ui.notification.notificationNewChip.label" }), size: "small", color: "error" }, props)));
}