@pushwoosh/dumb-components 1.1.71 → 1.1.72

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.
@@ -10,13 +10,14 @@ export const DropdownMenu = ({
10
10
  isScrollable,
11
11
  menuZIndex,
12
12
  menuPlacement,
13
+ windowWidth = null,
13
14
  openOnMount = false,
14
15
  fullWidth,
15
16
  onClose,
16
17
  children
17
18
  }) => {
18
19
  const [isOpen, setIsOpen] = useState(openOnMount);
19
- const [width, setWidth] = useState(null);
20
+ const [width, setWidth] = useState(windowWidth);
20
21
  const {
21
22
  refs,
22
23
  floatingStyles
@@ -13,6 +13,7 @@ export type DropdownMenuProps = {
13
13
  menuZIndex?: number;
14
14
  menuPlacement?: Placement;
15
15
  fullWidth?: boolean;
16
+ windowWidth?: number;
16
17
  onClose?: () => void;
17
18
  renderHandler: (args: HandlerProps) => ReactNode;
18
19
  children: (() => ReactNode) | ReactNode;
@@ -40,6 +40,7 @@ export function StatisticCard(props) {
40
40
  return React.createElement(StatValue, null, typeof value === 'number' ? formatNumber(value, 'spaced') : value);
41
41
  }, [isLoading, value, valueSubtext]);
42
42
  const resolvedRightSlot = rightSlot ?? (actions ? React.createElement(DropdownMenu, {
43
+ windowWidth: 230,
43
44
  renderHandler: ({
44
45
  onClick,
45
46
  ref,
@@ -62,7 +63,9 @@ export function StatisticCard(props) {
62
63
  key: a.id,
63
64
  onClick: a.onClick,
64
65
  disabled: a.disabled
65
- }, a.label)))) : null);
66
+ }, React.createElement(Text, {
67
+ "$ellipsis": true
68
+ }, a.label))))) : null);
66
69
  return React.createElement(Container, {
67
70
  "$active": active,
68
71
  "$selectable": selectable,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.71",
3
+ "version": "1.1.72",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",