@loja-integrada/admin-components 0.14.0 → 0.14.1

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.
@@ -6,7 +6,7 @@ declare const alertTypes: Record<alertTypesOptions, {
6
6
  icon: IconProps['icon'];
7
7
  iconClass: string;
8
8
  }>;
9
- export declare const Alert: React.MemoExoticComponent<({ type, isOpen, title, subtitle, actions, showClose, onClose, hideIcon, }: AlertProps) => JSX.Element | null>;
9
+ export declare const Alert: React.MemoExoticComponent<({ type, isOpen, title, subtitle, actions, showClose, onClose, hideIcon, customIcon, }: AlertProps) => JSX.Element | null>;
10
10
  export interface AlertProps {
11
11
  /** Alert color
12
12
  * @default info
@@ -36,6 +36,10 @@ export interface AlertProps {
36
36
  * @default false
37
37
  */
38
38
  hideIcon?: boolean;
39
+ /**
40
+ * Custom icon
41
+ */
42
+ customIcon?: IconProps['icon'];
39
43
  /**
40
44
  * Action for the alert, like button and hiperlinks
41
45
  * */
@@ -2323,7 +2323,8 @@ var AlertComponent = function AlertComponent(_ref) {
2323
2323
  showClose = _ref$showClose === void 0 ? false : _ref$showClose,
2324
2324
  onClose = _ref.onClose,
2325
2325
  _ref$hideIcon = _ref.hideIcon,
2326
- hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon;
2326
+ hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
2327
+ customIcon = _ref.customIcon;
2327
2328
 
2328
2329
  var _useState = React.useState(isOpen),
2329
2330
  alertIsOpen = _useState[0],
@@ -2344,7 +2345,7 @@ var AlertComponent = function AlertComponent(_ref) {
2344
2345
  }, !hideIcon && React__default.createElement("div", {
2345
2346
  className: "alert-icon hidden sm:block flex-shrink-0 mr-3 " + alertTypes[type].iconClass
2346
2347
  }, React__default.createElement(Icon, {
2347
- icon: alertTypes[type].icon,
2348
+ icon: customIcon ? customIcon : alertTypes[type].icon,
2348
2349
  size: 6
2349
2350
  })), React__default.createElement("div", {
2350
2351
  className: "flex-grow flex flex-col sm:flex-row items-start sm:items-center justify-between min-w-0"