@pushwoosh/dumb-components 1.0.79 → 1.0.81

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,8 @@ export const DropdownMenuItem = ({
6
6
  onClick,
7
7
  isActive,
8
8
  isDanger,
9
- disabled
9
+ disabled,
10
+ closeOnClick = true
10
11
  }) => {
11
12
  const onClickContext = useContext(DropdownContext);
12
13
  if (process.env.NODE_ENV === 'development') {
@@ -18,7 +19,9 @@ export const DropdownMenuItem = ({
18
19
  "$active": isActive,
19
20
  "$danger": isDanger,
20
21
  onClick: () => {
21
- onClickContext === null || onClickContext === void 0 || onClickContext(false);
22
+ if (closeOnClick) {
23
+ onClickContext === null || onClickContext === void 0 || onClickContext(false);
24
+ }
22
25
  onClick();
23
26
  },
24
27
  disabled: disabled
@@ -4,4 +4,5 @@ export type DropdownMenuItemProps = PropsWithChildren<{
4
4
  isActive?: boolean;
5
5
  isDanger?: boolean;
6
6
  disabled?: boolean;
7
+ closeOnClick?: boolean;
7
8
  }>;
@@ -1,7 +1,7 @@
1
1
  import { type ReactNode } from 'react';
2
2
  export type StatisticCardProps = CommonProps & (SelectableProps | NonSelectableProps);
3
3
  export type CommonProps = {
4
- title: string;
4
+ title: ReactNode;
5
5
  value: number;
6
6
  valueSubtext?: string;
7
7
  rightSlot?: ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.0.79",
3
+ "version": "1.0.81",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",