@hexure/ui 1.8.3 → 1.8.5

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.
@@ -5,7 +5,8 @@ export interface ButtonMenuProps {
5
5
  label: string;
6
6
  small?: boolean;
7
7
  menuItems: Array<MenuItemProps>;
8
- maxHeight?: string | number;
8
+ menuWidth?: string;
9
+ maxHeight?: string;
9
10
  position?: 'left' | 'right';
10
11
  format?: 'primary' | 'secondary';
11
12
  }
@@ -1,6 +1,6 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
  import { AccessibleProps } from '../../utils/Accessibility';
3
- interface ButtonProps extends AccessibleProps {
3
+ export interface ButtonProps extends AccessibleProps {
4
4
  disabled?: boolean;
5
5
  children: string;
6
6
  icon?: string;
package/dist/esm/index.js CHANGED
@@ -2444,13 +2444,14 @@ const StyledMoreMenu = styled(MoreMenu) `
2444
2444
  right: ${props => (props.$position === 'right' ? '0px' : 'auto')};
2445
2445
  left: ${props => (props.$position === 'left' ? '0px' : 'auto')};
2446
2446
  top: ${props => (props.$small ? '30px' : '40px')};
2447
+ width: ${props => props.$menuWidth};
2447
2448
  z-index: 10;
2448
2449
  `;
2449
- const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'right', format = 'primary', }) => {
2450
+ const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'right', format = 'primary', menuWidth = '200px', }) => {
2450
2451
  const [show_menu, toggleMenu] = useState(false);
2451
2452
  return (React.createElement(Wrapper$d, { onMouseEnter: disabled ? undefined : toggleMenu.bind(null, true), onMouseLeave: disabled ? undefined : toggleMenu.bind(null, false) },
2452
2453
  React.createElement(Button, { disabled: disabled, format: format, icon: mdiDotsHorizontal, small: small }, label),
2453
- show_menu ? (React.createElement(StyledMoreMenu, { "$position": position, "$small": small, maxHeight: maxHeight, menuItems: menuItems })) : null));
2454
+ show_menu ? (React.createElement(StyledMoreMenu, { "$menuWidth": menuWidth, "$position": position, "$small": small, maxHeight: maxHeight, menuItems: menuItems })) : null));
2454
2455
  };
2455
2456
 
2456
2457
  const Wrapper$c = styled.label `