@nulogy/components 14.7.1 → 14.7.2

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.
@@ -1,13 +1,16 @@
1
1
  import React from "react";
2
2
  import { ComponentVariant } from "../NDSProvider/ComponentVariantContext";
3
3
  import { StyledProps } from "../StyledProps";
4
- declare const DropdownMenu: React.ForwardRefExoticComponent<{
5
- children?: React.ReactNode;
6
- className?: string;
4
+ type DropdownMenuRenderProps = {
5
+ closeMenu: (e: React.MouseEvent) => void;
6
+ openMenu: (e: React.MouseEvent) => void;
7
+ };
8
+ interface DropdownMenuProps extends StyledProps {
9
+ children?: React.ReactNode | ((props: DropdownMenuRenderProps) => React.ReactElement);
7
10
  variant?: ComponentVariant;
8
11
  id?: string;
9
12
  disabled?: boolean;
10
- trigger?: () => React.FunctionComponentElement<unknown>;
13
+ trigger?: () => React.ReactElement;
11
14
  backgroundColor?: string;
12
15
  showArrow?: boolean;
13
16
  placement?: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
@@ -18,5 +21,7 @@ declare const DropdownMenu: React.ForwardRefExoticComponent<{
18
21
  openAriaLabel?: string;
19
22
  closeAriaLabel?: string;
20
23
  openOnHover?: boolean;
21
- } & StyledProps & React.RefAttributes<React.Ref<unknown>>>;
24
+ className?: string;
25
+ }
26
+ declare const DropdownMenu: React.ForwardRefExoticComponent<DropdownMenuProps & React.RefAttributes<React.Ref<unknown>>>;
22
27
  export default DropdownMenu;
@@ -52,3 +52,9 @@ export declare const SetToDisabled: {
52
52
  };
53
53
  };
54
54
  export declare const WithConditionallyRenderedMenuItems: () => React.JSX.Element;
55
+ export declare const WithRenderProps: {
56
+ (): React.JSX.Element;
57
+ story: {
58
+ name: string;
59
+ };
60
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nulogy/components",
3
- "version": "14.7.1",
3
+ "version": "14.7.2",
4
4
  "description": "Component library for the Nulogy Design System - http://nulogy.design",
5
5
  "private": false,
6
6
  "publishConfig": {