@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
39 lines (38 loc) • 1.37 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const styles_1 = require("@mui/material/styles");
const material_1 = require("@mui/material");
const react_intl_1 = require("react-intl");
const system_1 = require("@mui/system");
const classnames_1 = tslib_1.__importDefault(require("classnames"));
const PREFIX = 'SCNotificationNewChip';
const classes = {
root: `${PREFIX}-root`
};
const Root = (0, styles_1.styled)(material_1.Chip, {
name: PREFIX,
slot: 'Root',
overridesResolver: (props, styles) => [styles.root]
})(() => ({
marginRight: 3,
fontSize: 11,
padding: 3,
borderRadius: 3,
height: 20,
display: 'inline',
float: 'left'
}));
function NewChip(inProps) {
const props = (0, system_1.useThemeProps)({
props: inProps,
name: PREFIX
});
const { className = null } = props;
/**
* Renders root object
*/
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.notificationNewChip.label", defaultMessage: "ui.notification.notificationNewChip.label" }), size: "small", color: "error" }, props)));
}
exports.default = NewChip;
;