@magicbell/magicbell-react
Version:
React components for building a notification inbox for your app
27 lines • 1.16 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = NotificationTitle;
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
/** @jsxImportSource @emotion/react */
const react_1 = require("@emotion/react");
const MagicBellThemeContext_js_1 = require("../../context/MagicBellThemeContext.js");
/**
* Component that renders the title of a notification.
*
* @example
* <NotificationTitle notification={notification} />
*/
function NotificationTitle({ notification }) {
const { title } = notification;
const { notification: { default: { title: theme }, }, } = (0, MagicBellThemeContext_js_1.useTheme)();
return ((0, jsx_runtime_1.jsx)("p", { id: `magicbell-notification-title-${notification.id}`, css: (0, react_1.css) `
cursor: inherit;
font-weight: ${theme.fontWeight} !important;
font-family: ${theme.fontFamily} !important;
font-size: ${theme.fontSize} !important;
color: inherit !important;
line-height: 1.2 !important;
word-break: break-word !important;
`, children: title }));
}
//# sourceMappingURL=NotificationTitle.js.map