@notificationapi/react 1.0.0 → 1.0.2

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.
@@ -15,5 +15,7 @@ export type UnreadBadgeProps = {
15
15
  bottom?: number;
16
16
  left?: number;
17
17
  };
18
+ fontColor?: string;
19
+ bubbleColor?: string;
18
20
  };
19
21
  export declare const UnreadBadge: React.FunctionComponent<PropsWithChildren<UnreadBadgeProps>>;
@@ -1,11 +1,11 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { useContext as a } from "react";
3
- import { NotificationAPIContext as d } from "../Provider/context.js";
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { useContext as d } from "react";
3
+ import { NotificationAPIContext as a } from "../Provider/context.js";
4
4
  import { B as u } from "../../assets/Badge.js";
5
- const C = (t) => {
6
- var r, i, c, f;
7
- const o = a(d);
8
- return /* @__PURE__ */ l(
5
+ const b = (t) => {
6
+ var r, i, l, f;
7
+ const o = d(a);
8
+ return /* @__PURE__ */ c(
9
9
  u,
10
10
  {
11
11
  overlap: "circular",
@@ -15,13 +15,18 @@ const C = (t) => {
15
15
  max: t.max,
16
16
  variant: t.dot ? "dot" : "standard",
17
17
  showZero: t.showZero,
18
- color: "error",
18
+ sx: {
19
+ "& .MuiBadge-badge": {
20
+ backgroundColor: t.bubbleColor || "#d32f2f",
21
+ color: t.fontColor || "#FFF"
22
+ }
23
+ },
19
24
  slotProps: {
20
25
  badge: {
21
26
  style: {
22
27
  top: (r = t.offset) == null ? void 0 : r.top,
23
28
  right: (i = t.offset) == null ? void 0 : i.right,
24
- bottom: (c = t.offset) == null ? void 0 : c.bottom,
29
+ bottom: (l = t.offset) == null ? void 0 : l.bottom,
25
30
  left: (f = t.offset) == null ? void 0 : f.left
26
31
  }
27
32
  }
@@ -31,5 +36,5 @@ const C = (t) => {
31
36
  );
32
37
  };
33
38
  export {
34
- C as UnreadBadge
39
+ b as UnreadBadge
35
40
  };
package/dist/main.js CHANGED
@@ -5,7 +5,7 @@ import { NotificationCounter as c } from "./components/Notifications/Notificatio
5
5
  import { N } from "./assets/NotificationPreferencesPopup.js";
6
6
  import { NotificationPreferencesInline as x } from "./components/Preferences/NotificationPreferencesInline.js";
7
7
  import { NotificationAPIProvider as u } from "./components/Provider/index.js";
8
- import './assets/main.css';export {
8
+ export {
9
9
  u as NotificationAPIProvider,
10
10
  c as NotificationCounter,
11
11
  r as NotificationFeed,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@notificationapi/react",
3
3
  "private": false,
4
- "version": "1.0.0",
4
+ "version": "1.0.2",
5
5
  "type": "module",
6
6
  "browserslist": [
7
7
  "last 2 versions",
@@ -43,7 +43,7 @@
43
43
  "glob": "^10.4.1",
44
44
  "prettier": "^3.3.3",
45
45
  "typescript": "^5.2.2",
46
- "vite": "^5.2.0",
46
+ "vite": "^5.4.14",
47
47
  "vite-plugin-dts": "^3.9.1",
48
48
  "vite-plugin-lib-inject-css": "^2.1.1"
49
49
  },
@@ -52,9 +52,7 @@
52
52
  "files": [
53
53
  "dist"
54
54
  ],
55
- "sideEffects": [
56
- "**/*.css"
57
- ],
55
+ "sideEffects": false,
58
56
  "dependencies": {
59
57
  "@emotion/react": "^11.14.0",
60
58
  "@emotion/styled": "^11.14.0",
File without changes