@linzjs/lui 18.0.1 → 18.2.0

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [18.2.0](https://github.com/linz/lui/compare/v18.1.0...v18.2.0) (2023-07-26)
2
+
3
+
4
+ ### Features
5
+
6
+ * **LuiStaticMessage:** Adding onClose prop to LuiStaticMessage ([#969](https://github.com/linz/lui/issues/969)) ([6282e3a](https://github.com/linz/lui/commit/6282e3a704d8d4d69031f5200badb2cbc89a601d))
7
+
8
+ # [18.1.0](https://github.com/linz/lui/compare/v18.0.1...v18.1.0) (2023-07-25)
9
+
10
+
11
+ ### Features
12
+
13
+ * **LUIBadge:** add error variation in LUIBadge ([#968](https://github.com/linz/lui/issues/968)) ([1714000](https://github.com/linz/lui/commit/1714000c0a0c8d83040322367bff9f8a4a8225bc))
14
+
1
15
  ## [18.0.1](https://github.com/linz/lui/compare/v18.0.0...v18.0.1) (2023-07-24)
2
16
 
3
17
 
@@ -4,7 +4,7 @@ export interface ILuiBadge {
4
4
  children: React.ReactNode;
5
5
  size?: 'sm' | 'default' | 'lg';
6
6
  backgroundFill?: boolean;
7
- variation?: 'default' | 'warning' | 'info';
7
+ variation?: 'default' | 'warning' | 'info' | 'error';
8
8
  ariaRoleDescription: string;
9
9
  fillVariation?: LuiBadgeFillVariation;
10
10
  }
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
2
2
  export interface ILuiStaticMessage {
3
3
  level: 'success' | 'info' | 'warning' | 'error';
4
4
  closable?: boolean;
5
+ onClose?: () => void;
5
6
  icon?: string;
6
7
  className?: string;
7
8
  children?: ReactNode;
package/dist/index.js CHANGED
@@ -666,6 +666,7 @@ var LuiStaticMessage = function (props) {
666
666
  props.children,
667
667
  (props.closable === undefined || props.closable) && (React__default["default"].createElement("button", { "aria-label": "Close dialog", onClick: function () {
668
668
  setDisplay(false);
669
+ props.onClose && props.onClose();
669
670
  } },
670
671
  React__default["default"].createElement(LuiIcon, { name: "ic_clear", alt: 'close', size: "md", className: "LuiStaticMsg-close" }))))) : (React__default["default"].createElement(React__default["default"].Fragment, null));
671
672
  };