@bigbinary/neeto-molecules 1.1.21 → 1.1.23

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-molecules",
3
- "version": "1.1.21",
3
+ "version": "1.1.23",
4
4
  "description": "A package of reusable molecular components for neeto products.",
5
5
  "repository": "git@github.com:bigbinary/neeto-molecules.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",
@@ -5,54 +5,44 @@ type MenuItems = {
5
5
  onClick: () => void;
6
6
  key: string;
7
7
  isVisible?: boolean;
8
+ hasSubItems?: boolean;
9
+ dropdownProps?: DropdownProps;
10
+ menuItems?: MenuItems[];
8
11
  };
9
12
  /**
10
13
  *
11
- * The Rename component is used to rename a resource on the page, It can be used as
12
- *
13
- * the title in the Header component and provides props for additional actions with
14
- *
15
- * the dropdown.
14
+ * Dropdown menu with a 3 dot trigger button, can be used as a more menu.
16
15
  *
17
16
  * @example
18
17
  *
19
- * import Rename from "@bigbinary/neeto-molecules/Rename";
18
+ * import React from "react";
19
+ * import MoreDropdown from "@bigbinary/neeto-molecules/MoreDropdown";
20
20
  *
21
- * const App = () => {
22
- * const [value, setValue] = useState("Name");
23
- * return (
24
- * <Rename
25
- * value={value}
26
- * placeholder="Enter a name"
27
- * dropdownItems={[
28
- * {
29
- * label: "Clone",
30
- * onClick: () => alert("Clicked on clone"),
31
- * },
32
- * ]}
33
- * onRename={value => setValue(name)}
34
- * breadcrumbs={[
35
- * {
36
- * label: "Home",
37
- * link: "home",
38
- * },
39
- * {
40
- * label: "Contacts",
41
- * link: "contacts",
42
- * },
43
- * ]}
44
- * />
45
- * );
46
- * };
21
+ * const Component = () => (
22
+ * <MoreDropdown
23
+ * menuItems={[
24
+ * {
25
+ * key: "edit-menu",
26
+ * label: "Edit",
27
+ * onClick: () => setIsEditMenuVisible(true),
28
+ * },
29
+ * {
30
+ * key: "delete-menu",
31
+ * label: "Delete",
32
+ * onClick: () => setIsDeleteMenuVisible(true),
33
+ * },
34
+ * ]}
35
+ * />
36
+ * );
47
37
  * @endexample
48
38
  */
49
- const Rename: React.FC<{
50
- dropdownButtonProps: ButtonProps;
51
- isVertical: boolean;
52
- isDisabled: boolean;
53
- dropdownProps: DropdownProps;
39
+ const MoreDropdown: React.FC<{
40
+ dropdownButtonProps?: ButtonProps;
41
+ isVertical?: boolean;
42
+ isDisabled?: boolean;
43
+ dropdownProps?: DropdownProps;
54
44
  menuTopChildren: React.ReactNode;
55
45
  menuBottomChildren: React.ReactNode;
56
46
  menuItems: MenuItems[];
57
47
  }>;
58
- export default Rename;
48
+ export default MoreDropdown;