react-notify-sdk 1.0.18 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import InfoOutlineIcon from '@mui/icons-material/InfoOutline';
3
+ import WarningAmberIcon from '@mui/icons-material/WarningAmber';
4
+ import HighlightOffIcon from '@mui/icons-material/HighlightOff';
2
5
  const NotificationMessage = ({ message }) => {
3
6
  return (_jsxs("div", { style: {
4
7
  width: '100%',
@@ -9,11 +12,16 @@ const NotificationMessage = ({ message }) => {
9
12
  backgroundColor: message?.backgroundColor,
10
13
  border: `1px solid ${message?.textColor}`, // Completed border style
11
14
  borderRadius: "8px"
12
- }, children: [_jsx("p", { className: `text-lg font-semibold text-[${message?.textColor}]`, style: {
13
- fontSize: '1.125rem', // text-lg = 18px = 1.125rem
14
- fontWeight: 600, // font-semibold = 600
15
- color: `${message?.textColor}`,
16
- }, children: message.title }), _jsx("p", { className: `text-sm text-[${message?.textColor}]`, style: {
15
+ }, children: [_jsxs("div", { className: 'w-full flex flex-row', style: {
16
+ width: '100%',
17
+ display: 'flex',
18
+ flexDirection: 'row'
19
+ }, children: [message?.type === 'Information' && _jsx(InfoOutlineIcon, { fontSize: 'medium', sx: { color: '#4983c9' } }), message?.type === 'Warning' && _jsx(WarningAmberIcon, { fontSize: 'medium', sx: { color: '#ffbf00' } }), message?.type === 'Error' && _jsx(HighlightOffIcon, { fontSize: 'medium', sx: { color: '#d0342c' } }), _jsx("p", { className: `text-lg font-semibold text-[${message?.textColor}] ml-3`, style: {
20
+ fontSize: '1.125rem', // text-lg = 18px = 1.125rem
21
+ fontWeight: 600, // font-semibold = 600
22
+ color: `${message?.textColor}`,
23
+ marginLeft: '12px'
24
+ }, children: message.title })] }), _jsx("p", { className: `text-sm text-[${message?.textColor}]`, style: {
17
25
  marginTop: '8px',
18
26
  fontSize: '0.875rem', // text-sm = 14px = 0.875rem
19
27
  color: `${message?.textColor}`,
package/dist/types.d.ts CHANGED
@@ -13,6 +13,7 @@ export type NotifyMessage = {
13
13
  borderWidth: number;
14
14
  is_active: boolean;
15
15
  created_at: string;
16
+ type: string;
16
17
  };
17
18
  export type NotifyMessageProviderProps = {
18
19
  projectId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-notify-sdk",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "SDK for displaying real-time route-specific messages in React apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,12 +17,14 @@
17
17
  "dependencies": {
18
18
  "@supabase/supabase-js": "^2.50.0",
19
19
  "clsx": "^2.1.1",
20
- "goober": "^2.1.16"
20
+ "goober": "^2.1.16",
21
+ "heroicons": "^1.0.6"
21
22
  },
22
23
  "devDependencies": {
23
24
  "@types/react": "^19.1.8",
24
25
  "@types/react-router-dom": "^5.3.3",
25
- "typescript": "^5.8.3"
26
+ "typescript": "^5.8.3",
27
+ "@mui/icons-material": "^7.2.0"
26
28
  },
27
29
  "peerDependencies": {
28
30
  "react": "^19.1.0",