@sikka/hawa 0.0.43 → 0.0.44
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/countries.json +1 -0
- package/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +6 -1
- package/postcss.config.js +6 -0
- package/src/elements/ActionButton.js +11 -2
- package/src/elements/HawaButton.js +10 -2
- package/src/elements/HawaDrawerItem.js +26 -0
- package/src/elements/HawaPhoneInput2.js +78 -0
- package/src/elements/{AdaptiveButton.js → ResponsiveButton.js} +2 -2
- package/src/elements/index.js +4 -2
- package/src/layout/HawaBottomAppBar.js +76 -0
- package/src/layout/HawaDrawer.js +109 -0
- package/src/layout/HawaLayout.js +80 -0
- package/src/layout/index.js +3 -0
- package/src/styles.css +991 -2
- package/src/tailwind.css +3 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.html +1 -1
- package/storybook-static/main.3795aede.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/vendors~main.337d03df.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.261044d5.iframe.bundle.js.LICENSE.txt → vendors~main.337d03df.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.337d03df.iframe.bundle.js.map +1 -0
- package/tailwind.config.js +9 -0
- package/storybook-static/main.2f0f77ef.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.261044d5.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.261044d5.iframe.bundle.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sikka/hawa",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.44",
|
|
4
4
|
"description": "UI Kit",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.es.js",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"next": "^12.1.0",
|
|
38
38
|
"next-scripts": "^0.3.4",
|
|
39
39
|
"next-translate": "^1.3.5",
|
|
40
|
+
"postcss-focus-visible": "^7.1.0",
|
|
40
41
|
"qs": "^6.10.3",
|
|
41
42
|
"react": "^17.0.1",
|
|
42
43
|
"react-color": "^2.19.3",
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
53
54
|
"rollup-plugin-postcss": "^4.0.0",
|
|
54
55
|
"rollup-plugin-terser": "^7.0.2",
|
|
56
|
+
"tailwindcss": "^3.2.1",
|
|
55
57
|
"tinycolor2": "^1.4.2"
|
|
56
58
|
},
|
|
57
59
|
"peerDependencies": {
|
|
@@ -80,5 +82,8 @@
|
|
|
80
82
|
"@storybook/core-server/webpack": "^5",
|
|
81
83
|
"@storybook/builder-webpack4/webpack": "^5",
|
|
82
84
|
"@storybook/manager-webpack4/webpack": "^5"
|
|
85
|
+
},
|
|
86
|
+
"dependencies": {
|
|
87
|
+
"flowbite": "^1.5.3"
|
|
83
88
|
}
|
|
84
89
|
}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import Button from "@mui/material/Button";
|
|
2
1
|
|
|
3
2
|
export const ActionButton = (props) => {
|
|
4
|
-
|
|
3
|
+
// <Button {...props}>{props.text}</Button>;
|
|
4
|
+
return (
|
|
5
|
+
<button
|
|
6
|
+
type="button"
|
|
7
|
+
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center mr-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
|
8
|
+
>
|
|
9
|
+
{props.icon ? <div class="mr-2 -ml-1 w-5 h-5">{props.icon}</div> : null}
|
|
10
|
+
|
|
11
|
+
{props.children}
|
|
12
|
+
</button>
|
|
13
|
+
);
|
|
5
14
|
};
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import Button from "@mui/material/Button";
|
|
3
2
|
|
|
4
3
|
export const HawaButton = (props) => {
|
|
5
|
-
return
|
|
4
|
+
return (
|
|
5
|
+
<button
|
|
6
|
+
type="button"
|
|
7
|
+
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center mr-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
|
8
|
+
>
|
|
9
|
+
{props.icon ? <div class="mr-2 -ml-1 w-5 h-5">{props.icon}</div> : null}
|
|
10
|
+
|
|
11
|
+
{props.children}
|
|
12
|
+
</button>
|
|
13
|
+
);
|
|
6
14
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
const HawaDrawerItem = (props) => {
|
|
4
|
+
return (
|
|
5
|
+
<li>
|
|
6
|
+
<a
|
|
7
|
+
href="#"
|
|
8
|
+
class="flex items-center p-2 text-base font-normal text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700"
|
|
9
|
+
>
|
|
10
|
+
<svg
|
|
11
|
+
aria-hidden="true"
|
|
12
|
+
class="w-6 h-6 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white"
|
|
13
|
+
fill="currentColor"
|
|
14
|
+
viewBox="0 0 20 20"
|
|
15
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
>
|
|
17
|
+
<path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path>
|
|
18
|
+
<path d="M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"></path>
|
|
19
|
+
</svg>
|
|
20
|
+
<span class="ml-3">{props.text}</span>
|
|
21
|
+
</a>
|
|
22
|
+
</li>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default HawaDrawerItem;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// import { Input } from "@mui/material";
|
|
2
|
+
// import { height } from "@mui/system";
|
|
3
|
+
// import { useState } from "react";
|
|
4
|
+
// import Countries from "../../countries.json";
|
|
5
|
+
|
|
6
|
+
// export default function HawaPhoneInput2({ preferredCountry }) {
|
|
7
|
+
// const [code, setCode] = useState(preferredCountry.toUpperCase() ?? "");
|
|
8
|
+
// const [tel, setTel] = useState("");
|
|
9
|
+
|
|
10
|
+
// const handleChangePhone = (phone) => {
|
|
11
|
+
// if (phone.length == 0) {
|
|
12
|
+
// setTel("");
|
|
13
|
+
// setCode("");
|
|
14
|
+
// return;
|
|
15
|
+
// }
|
|
16
|
+
// if (!phone.startsWith("+")) phone = "+".concat(phone);
|
|
17
|
+
// if (phone.length >= 5) {
|
|
18
|
+
// setTel(phone);
|
|
19
|
+
// return;
|
|
20
|
+
// }
|
|
21
|
+
// let findDialCode = Countries.find((country) => country.dial_code == phone);
|
|
22
|
+
// if (findDialCode != undefined && findDialCode != null) {
|
|
23
|
+
// setCode(findDialCode.code);
|
|
24
|
+
// }
|
|
25
|
+
// setTel(phone);
|
|
26
|
+
// };
|
|
27
|
+
|
|
28
|
+
// return (
|
|
29
|
+
// <div
|
|
30
|
+
// style={{
|
|
31
|
+
// display: "flex",
|
|
32
|
+
// flexDirection: "row",
|
|
33
|
+
// justifyContent: "center",
|
|
34
|
+
// alignItems: "center",
|
|
35
|
+
// height: "100%"
|
|
36
|
+
// }}
|
|
37
|
+
// >
|
|
38
|
+
// <div style={{ maxWidth: "50px", height: "100%" }}>
|
|
39
|
+
// <select
|
|
40
|
+
// style={{
|
|
41
|
+
// width: 38,
|
|
42
|
+
// height: 40,
|
|
43
|
+
// scale: 1.2,
|
|
44
|
+
// borderRight: "none",
|
|
45
|
+
// borderTop: "none",
|
|
46
|
+
// borderTopLeftRadius: 10
|
|
47
|
+
// }}
|
|
48
|
+
// onChange={(e) => {
|
|
49
|
+
// setCode(e.target.value);
|
|
50
|
+
// setTel(
|
|
51
|
+
// Countries.find((country) => country.code == e.target.value)
|
|
52
|
+
// .dial_code
|
|
53
|
+
// );
|
|
54
|
+
// }}
|
|
55
|
+
// defaultValue={code}
|
|
56
|
+
// value={code}
|
|
57
|
+
// >
|
|
58
|
+
// {Countries.map((country) => (
|
|
59
|
+
// <option
|
|
60
|
+
// value={country.code}
|
|
61
|
+
// dangerouslySetInnerHTML={{
|
|
62
|
+
// __html: country.unicode + " " + country.name
|
|
63
|
+
// }}
|
|
64
|
+
// key={country.name + "_" + country.code}
|
|
65
|
+
// ></option>
|
|
66
|
+
// ))}
|
|
67
|
+
// </select>
|
|
68
|
+
// </div>
|
|
69
|
+
|
|
70
|
+
// <Input
|
|
71
|
+
// type="tel"
|
|
72
|
+
// style={{ borderBottomLeftRadius: 0, borderTopLeftRadius: 0 }}
|
|
73
|
+
// onChange={(e) => handleChangePhone(e.target.value)}
|
|
74
|
+
// value={tel}
|
|
75
|
+
// />
|
|
76
|
+
// </div>
|
|
77
|
+
// );
|
|
78
|
+
// }
|
|
@@ -3,7 +3,7 @@ import Button from "@mui/material/Button";
|
|
|
3
3
|
import Tooltip from "@mui/material/Tooltip";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
5
|
|
|
6
|
-
export const
|
|
6
|
+
export const ResponsiveButton = (props) => {
|
|
7
7
|
if (props.showText) {
|
|
8
8
|
return (
|
|
9
9
|
<Button variant="adaptive-dark" onClick={props.onClick}>
|
|
@@ -24,7 +24,7 @@ export const AdaptiveButton = (props) => {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
ResponsiveButton.propTypes = {
|
|
28
28
|
buttonText: PropTypes.string,
|
|
29
29
|
onClick: PropTypes.func,
|
|
30
30
|
showText: PropTypes.bool,
|
package/src/elements/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./ResponsiveButton";
|
|
2
2
|
export * from "./ActionButton";
|
|
3
3
|
export * from "./HawaSnackbar";
|
|
4
4
|
export * from "./HawaCheckbox";
|
|
@@ -20,4 +20,6 @@ export * from "./HawaSearchBar";
|
|
|
20
20
|
export * from "./HawaAccordian";
|
|
21
21
|
export * from "./DragDropImages";
|
|
22
22
|
export * from "./DraggableCard";
|
|
23
|
-
export * from "./HawaPhoneInput"
|
|
23
|
+
export * from "./HawaPhoneInput";
|
|
24
|
+
export * from "./HawaPhoneInput2";
|
|
25
|
+
export * from "./HawaDrawerItem";
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { AppBar, Paper, Box, IconButton, Typography } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export function HawaBottomAppBar({ args }) {
|
|
4
|
+
return (
|
|
5
|
+
<AppBar
|
|
6
|
+
position="fixed"
|
|
7
|
+
sx={args.sx}
|
|
8
|
+
style={{
|
|
9
|
+
bottom: 0,
|
|
10
|
+
top: "auto",
|
|
11
|
+
padding: 10,
|
|
12
|
+
flexDirection: "row",
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
justifyContent: "space-evenly"
|
|
15
|
+
}}
|
|
16
|
+
color={args.color}
|
|
17
|
+
>
|
|
18
|
+
<BottomAppBar appBarContent={args.appBarContent} />
|
|
19
|
+
</AppBar>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function BottomAppBar(props) {
|
|
24
|
+
return (
|
|
25
|
+
<Paper
|
|
26
|
+
elevation={3}
|
|
27
|
+
style={{
|
|
28
|
+
width: "100%",
|
|
29
|
+
display: "flex",
|
|
30
|
+
flexDirection: "row",
|
|
31
|
+
justifyContent: "space-evenly",
|
|
32
|
+
borderRadius: 10,
|
|
33
|
+
alignContent: "center",
|
|
34
|
+
padding: 10
|
|
35
|
+
}}
|
|
36
|
+
variant="outlined"
|
|
37
|
+
>
|
|
38
|
+
{props.appBarContent.map(({ label, icon, action }) => (
|
|
39
|
+
<SubAppBarContent label={label} icon={icon} action={action} />
|
|
40
|
+
))}
|
|
41
|
+
</Paper>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function SubAppBarContent(props) {
|
|
46
|
+
return (
|
|
47
|
+
<Box
|
|
48
|
+
display="flex"
|
|
49
|
+
flexDirection="row"
|
|
50
|
+
justifyContent="center"
|
|
51
|
+
alignItems="center"
|
|
52
|
+
sx={{
|
|
53
|
+
"&:hover": {
|
|
54
|
+
cursor: "pointer",
|
|
55
|
+
color: "blue"
|
|
56
|
+
}
|
|
57
|
+
}}
|
|
58
|
+
onClick={props.action}
|
|
59
|
+
>
|
|
60
|
+
<IconButton
|
|
61
|
+
sx={{
|
|
62
|
+
ml: 1,
|
|
63
|
+
"&.MuiButtonBase-root:hover": {
|
|
64
|
+
color: "blue",
|
|
65
|
+
bgcolor: "transparent"
|
|
66
|
+
}
|
|
67
|
+
}}
|
|
68
|
+
>
|
|
69
|
+
{props.icon}
|
|
70
|
+
</IconButton>
|
|
71
|
+
<Typography sx={{ display: { xs: "none", sm: "none", md: "block" } }}>
|
|
72
|
+
{props.label}
|
|
73
|
+
</Typography>
|
|
74
|
+
</Box>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import AppBar from "@mui/material/AppBar";
|
|
4
|
+
import Box from "@mui/material/Box";
|
|
5
|
+
import CssBaseline from "@mui/material/CssBaseline";
|
|
6
|
+
import Divider from "@mui/material/Divider";
|
|
7
|
+
import Drawer from "@mui/material/Drawer";
|
|
8
|
+
import List from "@mui/material/List";
|
|
9
|
+
import ListItem from "@mui/material/ListItem";
|
|
10
|
+
import ListItemButton from "@mui/material/ListItemButton";
|
|
11
|
+
import ListItemIcon from "@mui/material/ListItemIcon";
|
|
12
|
+
import ListItemText from "@mui/material/ListItemText";
|
|
13
|
+
import Toolbar from "@mui/material/Toolbar";
|
|
14
|
+
import SplitscreenIcon from "@mui/icons-material/Splitscreen";
|
|
15
|
+
import StyleIcon from "@mui/icons-material/Style";
|
|
16
|
+
import SettingsIcon from "@mui/icons-material/Settings";
|
|
17
|
+
|
|
18
|
+
export function HawaDrawer(props) {
|
|
19
|
+
const { window, children } = props;
|
|
20
|
+
const [mobileOpen, setMobileOpen] = React.useState(false);
|
|
21
|
+
const [drawerMaxWidth, setDrawerMaxWidth] = React.useState(
|
|
22
|
+
props.drawerMaxWidth ?? 240
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const handleDrawerToggle = () => {
|
|
26
|
+
props.handleDrawerToggle();
|
|
27
|
+
setMobileOpen(!mobileOpen);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const drawer = (
|
|
31
|
+
<div>
|
|
32
|
+
<Toolbar />
|
|
33
|
+
<Divider />
|
|
34
|
+
<List>
|
|
35
|
+
{props.drawerContent.map(({ label, icon, action }, index) => (
|
|
36
|
+
<ListItem key={label} disablePadding onClick={props.action}>
|
|
37
|
+
<ListItemButton>
|
|
38
|
+
<ListItemIcon>{icon}</ListItemIcon>
|
|
39
|
+
<ListItemText primary={label} />
|
|
40
|
+
</ListItemButton>
|
|
41
|
+
</ListItem>
|
|
42
|
+
))}
|
|
43
|
+
</List>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
const container =
|
|
48
|
+
window !== undefined ? () => window().document.body : undefined;
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<Box sx={{ display: "flex" }}>
|
|
52
|
+
<CssBaseline />
|
|
53
|
+
<Box
|
|
54
|
+
component="nav"
|
|
55
|
+
sx={{ width: { sm: drawerMaxWidth }, flexShrink: { sm: 0 } }}
|
|
56
|
+
aria-label="mailbox folders"
|
|
57
|
+
>
|
|
58
|
+
{/* The implementation can be swapped with js to avoid SEO duplication of links. */}
|
|
59
|
+
<Drawer
|
|
60
|
+
container={container}
|
|
61
|
+
variant="temporary"
|
|
62
|
+
open={mobileOpen}
|
|
63
|
+
onClose={handleDrawerToggle}
|
|
64
|
+
ModalProps={{
|
|
65
|
+
keepMounted: true // Better open performance on mobile.
|
|
66
|
+
}}
|
|
67
|
+
sx={{
|
|
68
|
+
display: { xs: "block", sm: "none" },
|
|
69
|
+
"& .MuiDrawer-paper": {
|
|
70
|
+
boxSizing: "border-box",
|
|
71
|
+
width: drawerMaxWidth
|
|
72
|
+
}
|
|
73
|
+
}}
|
|
74
|
+
>
|
|
75
|
+
{drawer}
|
|
76
|
+
</Drawer>
|
|
77
|
+
<Drawer
|
|
78
|
+
variant="permanent"
|
|
79
|
+
sx={{
|
|
80
|
+
display: { xs: "none", sm: "block" },
|
|
81
|
+
"& .MuiDrawer-paper": {
|
|
82
|
+
boxSizing: "border-box",
|
|
83
|
+
width: drawerMaxWidth
|
|
84
|
+
}
|
|
85
|
+
}}
|
|
86
|
+
open
|
|
87
|
+
>
|
|
88
|
+
{drawer}
|
|
89
|
+
</Drawer>
|
|
90
|
+
</Box>
|
|
91
|
+
|
|
92
|
+
<Box
|
|
93
|
+
component="main"
|
|
94
|
+
sx={{
|
|
95
|
+
flexGrow: 1,
|
|
96
|
+
p: 3,
|
|
97
|
+
width: { sm: `calc(100% - ${drawerMaxWidth}px)` }
|
|
98
|
+
}}
|
|
99
|
+
// style={{
|
|
100
|
+
// backgroundColor: "red",
|
|
101
|
+
// height: "100%"
|
|
102
|
+
// }}
|
|
103
|
+
>
|
|
104
|
+
{/* <Toolbar /> */}
|
|
105
|
+
{children}
|
|
106
|
+
</Box>
|
|
107
|
+
</Box>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
// import PropTypes from "prop-types";
|
|
3
|
+
import "flowbite";
|
|
4
|
+
import HawaDrawerItem from "../elements/HawaDrawerItem";
|
|
5
|
+
export const HawaLayout = (props) => {
|
|
6
|
+
return (
|
|
7
|
+
<div>
|
|
8
|
+
<button
|
|
9
|
+
data-drawer-target="drawer-navigation"
|
|
10
|
+
data-drawer-show="drawer-navigation"
|
|
11
|
+
aria-controls="drawer-navigation"
|
|
12
|
+
type="button"
|
|
13
|
+
class="inline-flex items-center p-2 ml-1 text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600"
|
|
14
|
+
>
|
|
15
|
+
<span class="sr-only">Open main menu</span>
|
|
16
|
+
<svg
|
|
17
|
+
aria-hidden="true"
|
|
18
|
+
class="w-6 h-6"
|
|
19
|
+
fill="currentColor"
|
|
20
|
+
viewBox="0 0 20 20"
|
|
21
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
22
|
+
>
|
|
23
|
+
<path
|
|
24
|
+
fill-rule="evenodd"
|
|
25
|
+
d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
|
26
|
+
clip-rule="evenodd"
|
|
27
|
+
></path>
|
|
28
|
+
</svg>
|
|
29
|
+
</button>
|
|
30
|
+
|
|
31
|
+
<div
|
|
32
|
+
id="drawer-navigation"
|
|
33
|
+
class="fixed z-40 h-screen p-4 overflow-y-auto bg-white w-80 dark:bg-gray-800"
|
|
34
|
+
tabindex="-1"
|
|
35
|
+
aria-labelledby="drawer-navigation-label"
|
|
36
|
+
>
|
|
37
|
+
<h5
|
|
38
|
+
id="drawer-navigation-label"
|
|
39
|
+
class="text-base font-semibold text-gray-500 uppercase dark:text-gray-400"
|
|
40
|
+
>
|
|
41
|
+
{props.appTitle}
|
|
42
|
+
</h5>
|
|
43
|
+
<button
|
|
44
|
+
type="button"
|
|
45
|
+
data-drawer-dismiss="drawer-navigation"
|
|
46
|
+
aria-controls="drawer-navigation"
|
|
47
|
+
class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 absolute top-2.5 right-2.5 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white"
|
|
48
|
+
>
|
|
49
|
+
<svg
|
|
50
|
+
aria-hidden="true"
|
|
51
|
+
class="w-5 h-5"
|
|
52
|
+
fill="currentColor"
|
|
53
|
+
viewBox="0 0 20 20"
|
|
54
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
55
|
+
>
|
|
56
|
+
<path
|
|
57
|
+
fill-rule="evenodd"
|
|
58
|
+
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
|
|
59
|
+
clip-rule="evenodd"
|
|
60
|
+
></path>
|
|
61
|
+
</svg>
|
|
62
|
+
<span class="sr-only">Close menu</span>
|
|
63
|
+
</button>
|
|
64
|
+
<div class="py-4 overflow-y-auto">
|
|
65
|
+
<ul class="space-y-2">
|
|
66
|
+
{props.drawerItems.map((item, i) => {
|
|
67
|
+
return <HawaDrawerItem key={i} text={item.text} />;
|
|
68
|
+
})}
|
|
69
|
+
</ul>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// ResponsiveButton.propTypes = {
|
|
77
|
+
// buttonText: PropTypes.string,
|
|
78
|
+
// onClick: PropTypes.func,
|
|
79
|
+
// showText: PropTypes.bool,
|
|
80
|
+
// };
|
package/src/layout/index.js
CHANGED