@sikka/hawa 0.0.94 → 0.0.95
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/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/src/elements/HawaMenu.js +46 -34
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.ea9904c2.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/{vendors~main.30019f92.iframe.bundle.js → vendors~main.a40572d0.iframe.bundle.js} +3 -3
- package/storybook-static/{vendors~main.30019f92.iframe.bundle.js.LICENSE.txt → vendors~main.a40572d0.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.a40572d0.iframe.bundle.js.map +1 -0
- package/storybook-static/main.c9ced472.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.30019f92.iframe.bundle.js.map +0 -1
package/package.json
CHANGED
package/src/elements/HawaMenu.js
CHANGED
|
@@ -6,42 +6,54 @@ export const HawaMenu = ({
|
|
|
6
6
|
withHeader,
|
|
7
7
|
withIcons,
|
|
8
8
|
headerTitle,
|
|
9
|
-
headerSubtitle
|
|
9
|
+
headerSubtitle,
|
|
10
|
+
open,
|
|
11
|
+
handleClose
|
|
10
12
|
}) => {
|
|
11
13
|
return (
|
|
12
|
-
<div
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
14
|
+
<div>
|
|
15
|
+
<button
|
|
16
|
+
className="border rounded w-44 p-2 bg-blue-700 text-white"
|
|
17
|
+
onClick={() => handleClose(!open)}
|
|
18
|
+
>
|
|
19
|
+
Menu Dropdown
|
|
20
|
+
</button>
|
|
21
|
+
<div
|
|
22
|
+
id={popMenuID}
|
|
23
|
+
className={`${
|
|
24
|
+
open ? "block" : "hidden"
|
|
25
|
+
} z-10 w-44 bg-white rounded-lg divide-y divide-gray-100 shadow dark:bg-gray-700`}
|
|
26
|
+
>
|
|
27
|
+
{withHeader && (
|
|
28
|
+
<div class="py-3 px-4 text-sm text-gray-900 dark:text-white">
|
|
29
|
+
<div>{headerTitle}</div>
|
|
30
|
+
<div class="font-medium truncate">{headerSubtitle}</div>
|
|
31
|
+
</div>
|
|
32
|
+
)}
|
|
33
|
+
{menuItems.map((group) => {
|
|
34
|
+
return (
|
|
35
|
+
<ul className="py-1 text-sm text-gray-700 dark:text-gray-200">
|
|
36
|
+
{group.map((item) => {
|
|
37
|
+
return (
|
|
38
|
+
<li
|
|
39
|
+
onClick={item.action}
|
|
40
|
+
className={
|
|
41
|
+
item.button
|
|
42
|
+
? "bg-primary-500 text-white hover:bg-primary-600 flex flex-row rtl:flex-row-reverse items-center cursor-pointer py-2 px-4 rounded-lg mx-1 hover:bg-gray-100 dark:hover:bg-primary-600 dark:hover:text-white"
|
|
43
|
+
: "flex flex-row rtl:flex-row-reverse items-center cursor-pointer py-2 px-4 rounded-lg mx-1 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
|
|
44
|
+
}
|
|
45
|
+
>
|
|
46
|
+
{withIcons && (
|
|
47
|
+
<div className="mr-2 rtl:ml-2">{item.icon}</div>
|
|
48
|
+
)}
|
|
49
|
+
{item.label}
|
|
50
|
+
</li>
|
|
51
|
+
);
|
|
52
|
+
})}
|
|
53
|
+
</ul>
|
|
54
|
+
);
|
|
55
|
+
})}
|
|
56
|
+
</div>
|
|
45
57
|
</div>
|
|
46
58
|
);
|
|
47
59
|
};
|
|
@@ -361,4 +361,4 @@
|
|
|
361
361
|
|
|
362
362
|
|
|
363
363
|
|
|
364
|
-
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.67ec6e92.iframe.bundle.js"></script><script src="vendors~main.
|
|
364
|
+
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.67ec6e92.iframe.bundle.js"></script><script src="vendors~main.a40572d0.iframe.bundle.js"></script><script src="main.ea9904c2.iframe.bundle.js"></script></body></html>
|