UNPKG

@magicbell/magicbell-react

Version:

React components for building a notification inbox for your app

24 lines 967 B
import { jsx as _jsx } from "@emotion/react/jsx-runtime"; /** @jsxImportSource @emotion/react */ import { css } from '@emotion/react'; import { useTheme } from '../../context/MagicBellThemeContext.js'; /** * Component that renders the title of a notification. * * @example * <NotificationTitle notification={notification} /> */ export default function NotificationTitle({ notification }) { const { title } = notification; const { notification: { default: { title: theme }, }, } = useTheme(); return (_jsx("p", { id: `magicbell-notification-title-${notification.id}`, css: 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