@hexure/ui 1.8.5 → 1.8.7

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.
@@ -20,7 +20,7 @@ export interface ButtonProps extends AccessibleProps {
20
20
  /** If enabled, the small button format will be used. */
21
21
  small?: boolean;
22
22
  /** Define which button format to display. By default the Primary button will be used. */
23
- format?: 'primary' | 'secondary' | 'red';
23
+ format?: 'primary' | 'secondary' | 'red' | 'green';
24
24
  }
25
25
  declare const Button: FC<ButtonProps>;
26
26
  export default Button;
@@ -8,13 +8,14 @@ export interface PageHeaderProps {
8
8
  }>;
9
9
  actions?: Array<{
10
10
  disabled?: boolean;
11
- format?: 'primary' | 'secondary' | 'red';
11
+ format?: 'primary' | 'secondary' | 'red' | 'green';
12
12
  icon?: string;
13
13
  label: string;
14
14
  onClick?: (e: any) => void;
15
15
  }>;
16
16
  buttonMenu?: {
17
17
  disabled?: boolean;
18
+ format?: 'primary' | 'secondary';
18
19
  icon?: string;
19
20
  label: string;
20
21
  menuItems: Array<MenuItemProps>;
package/dist/esm/index.js CHANGED
@@ -2059,6 +2059,13 @@ const button_type_mapping = {
2059
2059
  badge_bg_color: '#fff',
2060
2060
  badge_content_color: Colors.RED.Hex,
2061
2061
  },
2062
+ green: {
2063
+ background_color: Colors.GREEN.Hex,
2064
+ border_color: Colors.GREEN.Hex,
2065
+ content_color: '#fff',
2066
+ badge_bg_color: '#fff',
2067
+ badge_content_color: Colors.GREEN.Hex,
2068
+ },
2062
2069
  };
2063
2070
  const StyledButton = styled.button `
2064
2071
  height: ${props => (props.$small ? '30px' : '40px')};
@@ -3802,21 +3809,21 @@ const Actions = styled.div `
3802
3809
  gap: 8px;
3803
3810
  `;
3804
3811
  const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu }) => {
3805
- const { menuItems = [], label = '', } = buttonMenu || {};
3812
+ const { format = 'primary', menuItems = [], label = '', } = buttonMenu || {};
3806
3813
  return (React.createElement(Wrapper$5, null,
3807
3814
  React.createElement(Info, null,
3808
3815
  React.createElement(Heading, { type: 'secondary' }, title),
3809
3816
  breadcrumbs ? (React.createElement(Breadcrumbs, null, breadcrumbs.map((crumb, i) => {
3810
- return (React.createElement(React.Fragment, null,
3817
+ return (React.createElement(React.Fragment, { key: i },
3811
3818
  crumb.onClick ? (React.createElement(Link, { onClick: crumb.onClick, small: true }, crumb.label)) : (React.createElement(Copy, { type: 'small' }, crumb.label)),
3812
3819
  i + 1 < breadcrumbs.length ? React.createElement(Icon$1, { path: mdiChevronRight, size: '14px' }) : null));
3813
3820
  }))) : null),
3814
3821
  actions ? (React.createElement(Actions, null,
3815
- actions.map(action => {
3822
+ actions.map((action, i) => {
3816
3823
  const { label } = action, buttonProps = __rest(action, ["label"]);
3817
- return (React.createElement(Button, Object.assign({}, buttonProps, { small: true }), label));
3824
+ return (React.createElement(Button, Object.assign({}, buttonProps, { key: i, small: true }), label));
3818
3825
  }),
3819
- menuItems.length ? (React.createElement(ButtonMenu, { label: label, menuItems: menuItems, small: true })) : null)) : null));
3826
+ menuItems.length ? (React.createElement(ButtonMenu, { format: format, label: label, menuItems: menuItems, small: true })) : null)) : null));
3820
3827
  };
3821
3828
 
3822
3829
  const Wrapper$4 = styled.nav `