@bigbinary/neeto-molecules 1.0.109 → 1.0.111
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/dist/MoreDropdown.cjs.js +147 -0
- package/dist/MoreDropdown.cjs.js.map +1 -0
- package/dist/MoreDropdown.js +141 -0
- package/dist/MoreDropdown.js.map +1 -0
- package/dist/Sidebar.cjs.js +8 -3
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +8 -3
- package/dist/Sidebar.js.map +1 -1
- package/package.json +1 -1
- package/types/MoreDropdown.d.ts +57 -0
- package/types/Sidebar.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.111",
|
|
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>",
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ButtonProps, DropdownProps, InputProps, TypographyProps } from "@bigbinary/neetoui";
|
|
2
|
+
import React from "react";
|
|
3
|
+
type MenuItems = {
|
|
4
|
+
label: string;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
key: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* The Rename component is used to rename a resource on the page, It can be used as
|
|
11
|
+
*
|
|
12
|
+
* the title in the Header component and provides props for additional actions with
|
|
13
|
+
*
|
|
14
|
+
* the dropdown.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
*
|
|
18
|
+
* import Rename from "@bigbinary/neeto-molecules/Rename";
|
|
19
|
+
*
|
|
20
|
+
* const App = () => {
|
|
21
|
+
* const [value, setValue] = useState("Name");
|
|
22
|
+
* return (
|
|
23
|
+
* <Rename
|
|
24
|
+
* value={value}
|
|
25
|
+
* placeholder="Enter a name"
|
|
26
|
+
* dropdownItems={[
|
|
27
|
+
* {
|
|
28
|
+
* label: "Clone",
|
|
29
|
+
* onClick: () => alert("Clicked on clone"),
|
|
30
|
+
* },
|
|
31
|
+
* ]}
|
|
32
|
+
* onRename={value => setValue(name)}
|
|
33
|
+
* breadcrumbs={[
|
|
34
|
+
* {
|
|
35
|
+
* label: "Home",
|
|
36
|
+
* link: "home",
|
|
37
|
+
* },
|
|
38
|
+
* {
|
|
39
|
+
* label: "Contacts",
|
|
40
|
+
* link: "contacts",
|
|
41
|
+
* },
|
|
42
|
+
* ]}
|
|
43
|
+
* />
|
|
44
|
+
* );
|
|
45
|
+
* };
|
|
46
|
+
* @endexample
|
|
47
|
+
*/
|
|
48
|
+
const Rename: React.FC<{
|
|
49
|
+
dropdownButtonProps: ButtonProps;
|
|
50
|
+
isVertical: boolean;
|
|
51
|
+
isDisabled: boolean;
|
|
52
|
+
dropdownProps: DropdownProps;
|
|
53
|
+
menuTopChildren: React.ReactNode;
|
|
54
|
+
menuBottomChildren: React.ReactNode;
|
|
55
|
+
menuItems: MenuItems[];
|
|
56
|
+
}>;
|
|
57
|
+
export default Rename;
|