@soul-refiner/design-system 0.2.53 → 0.2.55

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.
@@ -9,7 +9,7 @@ declare const InnerNav: {
9
9
  displayName: string;
10
10
  };
11
11
  Dropdown: {
12
- ({ children, href, icon, label, open, sx, }: InnerNavDropdownProps): React.JSX.Element;
12
+ ({ children, href, icon, label, open, sx, onClick, }: InnerNavDropdownProps): React.JSX.Element;
13
13
  displayName: string;
14
14
  };
15
15
  BackButton: {
@@ -59,11 +59,12 @@ export interface InnerNavItemProps {
59
59
  * Dropdown
60
60
  */
61
61
  export interface InnerNavDropdownProps extends React.PropsWithChildren {
62
- href: string;
62
+ href?: string;
63
63
  icon?: React.ReactElement;
64
64
  label: React.ReactNode;
65
65
  open: boolean;
66
66
  sx?: string;
67
+ onClick?: React.MouseEventHandler;
67
68
  }
68
69
  /*************************************************************************************************************************
69
70
  * Back Button
@@ -82,10 +82,10 @@ const Item = styled.button `
82
82
  `;
83
83
  InnerNav.Item = InnerNavItem;
84
84
  InnerNavItem.displayName = 'InnerNav.Item';
85
- const InnerNavDropdown = ({ children, href, icon, label, open, sx, }) => {
85
+ const InnerNavDropdown = ({ children, href, icon, label, open, sx, onClick, }) => {
86
86
  const isAnchor = !!href;
87
87
  return (React.createElement(React.Fragment, null,
88
- React.createElement(Item, { "$active": false, "$sx": sx, as: isAnchor ? 'a' : 'button', href: href },
88
+ React.createElement(Item, { "$active": false, "$sx": sx, as: isAnchor ? 'a' : 'button', href: !!onClick ? undefined : href, onClick: onClick },
89
89
  icon,
90
90
  React.createElement(DropdownTriggerWrapper, null,
91
91
  label,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soul-refiner/design-system",
3
- "version": "0.2.53",
3
+ "version": "0.2.55",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "publishConfig": {