@soul-refiner/design-system 0.2.10 → 0.2.11

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.
@@ -3,7 +3,7 @@ type NotificationTypes = 'error' | 'info' | 'success' | 'warning';
3
3
  export interface NotificationProps {
4
4
  content: string;
5
5
  href?: string;
6
- onClose: () => void;
6
+ onClose?: () => void;
7
7
  sx?: string;
8
8
  title: string;
9
9
  type: NotificationTypes;
@@ -15,7 +15,7 @@ export const Notification = ({ content, href, onClose, sx, title, type, }) => {
15
15
  React.createElement(Box, { "$dir": "row", "$gap": 8, "$flex": 1 },
16
16
  iconLookup[type],
17
17
  React.createElement(P, { as: "span", "$semiBold": true }, title),
18
- React.createElement(Button, { icon: React.createElement(Close, { size: 24 }), onClick: onClose, sx: "margin-left: auto;", type: "special" })),
18
+ onClose && (React.createElement(Button, { icon: React.createElement(Close, { size: 24 }), onClick: onClose, sx: "margin-left: auto;", type: "special" }))),
19
19
  React.createElement(Box, { "$align": "center", "$dir": "row", "$gap": 4 },
20
20
  React.createElement(P, { as: "span", sx: "padding-left: 32px;" }, content))));
21
21
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soul-refiner/design-system",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "publishConfig": {