@servicetitan/assist-ui
Version:
ServiceTitan Assist UI Components
16 lines • 1.49 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Card, Flex, Text } from '@servicetitan/anvil2';
import { MarkdownText } from '../markdown-text';
export const NotificationCard = ({ title, message, timestamp, onClick, unread = false, }) => {
return (_jsx(Card, { onClick: onClick, style: {
cursor: 'pointer',
}, children: _jsxs(Flex, { direction: "column", gap: 2, style: { width: '100%' }, children: [_jsxs(Flex, { alignItems: "center", justifyContent: "space-between", children: [_jsx(Text, { size: "medium", style: { color: '#0067E4' }, children: unread ? _jsx("b", { children: title }) : title }), _jsx(Flex, { alignItems: "center", gap: 1, children: _jsxs(Text, { size: "small", style: { color: '#6B6B6B' }, children: [timestamp, unread && (_jsx("span", { style: {
display: 'inline-block',
width: 12,
height: 12,
borderRadius: '50%',
background: '#E23D18',
marginLeft: 8,
} }))] }) })] }), _jsx(Text, { size: "small", style: { color: '#6B6B6B' }, children: unread ? (_jsx("b", { children: _jsx(MarkdownText, { text: message }) })) : (_jsx(MarkdownText, { text: message })) })] }) }));
};
//# sourceMappingURL=notification-card.js.map