@sikka/hawa 0.0.34 → 0.0.37
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/README.md +11 -0
- package/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +12 -9
- package/src/elements/AdaptiveButton.js +1 -1
- package/src/elements/DragDropImages.js +135 -143
- package/src/elements/DraggableCard.js +36 -0
- package/src/elements/HawaSelectInput.js +30 -0
- package/src/elements/HawaSnackbar.js +32 -3
- package/src/elements/index.js +2 -0
- package/src/index.js +1 -0
- package/src/layout/HawaAppLayout.js +197 -173
- package/src/layout/HawaAppLayout2.js +260 -0
- package/src/theme/HawaTheme.js +882 -0
- package/src/theme/index.js +2 -0
- package/storybook-static/0.a2c13f8ca8477800b11f.manager.bundle.js +2 -0
- package/storybook-static/{0.0d994c92.iframe.bundle.js.LICENSE.txt → 0.a2c13f8ca8477800b11f.manager.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/0.d94b248f.iframe.bundle.js +3 -0
- package/storybook-static/{4.0fcda1281dc1961dbe94.manager.bundle.js.LICENSE.txt → 0.d94b248f.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/0.d94b248f.iframe.bundle.js.map +1 -0
- package/storybook-static/1.37f89487.iframe.bundle.js +1 -0
- package/storybook-static/1.d522251f2377f7751924.manager.bundle.js +1 -0
- package/storybook-static/{2.430bf1e3.iframe.bundle.js → 2.89943a03.iframe.bundle.js} +1 -1
- package/storybook-static/5.a331b0a36ded1c541923.manager.bundle.js +2 -0
- package/storybook-static/5.a331b0a36ded1c541923.manager.bundle.js.LICENSE.txt +31 -0
- package/storybook-static/6.3a1fb0c3.iframe.bundle.js +3 -0
- package/storybook-static/6.3a1fb0c3.iframe.bundle.js.LICENSE.txt +31 -0
- package/storybook-static/6.3a1fb0c3.iframe.bundle.js.map +1 -0
- package/storybook-static/6.aee6c4935c69d480fc0d.manager.bundle.js +1 -0
- package/storybook-static/7.5b8a4de4b5fa42d8de02.manager.bundle.js +1 -0
- package/storybook-static/7.f33530b1.iframe.bundle.js +1 -0
- package/storybook-static/8.a3dec9c37e8951a17939.manager.bundle.js +2 -0
- package/storybook-static/{6.a6d45262f7e98f3f18d3.manager.bundle.js.LICENSE.txt → 8.a3dec9c37e8951a17939.manager.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/8.b569e86b.iframe.bundle.js +1 -0
- package/storybook-static/{8.76c3cbf398692028e834.manager.bundle.js → 9.d04fdaada645cd23cb4b.manager.bundle.js} +1 -1
- package/storybook-static/9.f9db5c90.iframe.bundle.js +3 -0
- package/storybook-static/{7.9ce807e3.iframe.bundle.js.LICENSE.txt → 9.f9db5c90.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/9.f9db5c90.iframe.bundle.js.map +1 -0
- package/storybook-static/iframe.html +19 -3
- package/storybook-static/index.html +2 -2
- package/storybook-static/main.1a0e1257.iframe.bundle.js +1 -0
- package/storybook-static/main.750dea0e0e515fd26844.manager.bundle.js +1 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/runtime~main.1bd817501fb34a0cb56b.manager.bundle.js +1 -0
- package/storybook-static/runtime~main.9be73be4.iframe.bundle.js +1 -0
- package/storybook-static/vendors~main.826e89a1.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.a7262b49.iframe.bundle.js.LICENSE.txt → vendors~main.826e89a1.iframe.bundle.js.LICENSE.txt} +15 -0
- package/storybook-static/vendors~main.826e89a1.iframe.bundle.js.map +1 -0
- package/storybook-static/vendors~main.ed8bc18573e141ab3b26.manager.bundle.js +2 -0
- package/storybook-static/{vendors~main.a697e07137d366f95f76.manager.bundle.js.LICENSE.txt → vendors~main.ed8bc18573e141ab3b26.manager.bundle.js.LICENSE.txt} +18 -18
- package/storybook-static/0.0d994c92.iframe.bundle.js +0 -3
- package/storybook-static/0.0d994c92.iframe.bundle.js.map +0 -1
- package/storybook-static/0.f47eb24a4893a96ec307.manager.bundle.js +0 -1
- package/storybook-static/1.aabc3f3a.iframe.bundle.js +0 -1
- package/storybook-static/4.0fcda1281dc1961dbe94.manager.bundle.js +0 -2
- package/storybook-static/5.63ab4f94d50a3acf080d.manager.bundle.js +0 -1
- package/storybook-static/6.13a534cb.iframe.bundle.js +0 -1
- package/storybook-static/6.a6d45262f7e98f3f18d3.manager.bundle.js +0 -2
- package/storybook-static/7.097710753af9a1c41b80.manager.bundle.js +0 -1
- package/storybook-static/7.9ce807e3.iframe.bundle.js +0 -3
- package/storybook-static/7.9ce807e3.iframe.bundle.js.map +0 -1
- package/storybook-static/8.1bf48ea7.iframe.bundle.js +0 -1
- package/storybook-static/main.9d5968bcf15d21f5487c.manager.bundle.js +0 -1
- package/storybook-static/main.e9b7f5c4.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.708d7ac1.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.c8dac23bc753439736f0.manager.bundle.js +0 -1
- package/storybook-static/vendors~main.a697e07137d366f95f76.manager.bundle.js +0 -2
- package/storybook-static/vendors~main.a7262b49.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.a7262b49.iframe.bundle.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
2
|
// import axios from "axios";
|
|
3
|
-
import { getToken } from "../token";
|
|
4
3
|
import { useDropzone } from "react-dropzone";
|
|
5
|
-
import useTranslation from "next-translate/useTranslation";
|
|
6
|
-
import Badge from "@mui/material/Badge";
|
|
7
4
|
import CloseIcon from "@mui/icons-material/Close";
|
|
8
|
-
import
|
|
5
|
+
// import styled from "@emotion/styled";
|
|
6
|
+
import { Button, Container, IconButton, Typography } from "@mui/material";
|
|
7
|
+
import { useTheme } from "@mui/system";
|
|
8
|
+
import { HawaAlert } from "./HawaAlert";
|
|
9
9
|
|
|
10
10
|
const thumbsContainer = {
|
|
11
11
|
display: "flex",
|
|
@@ -14,23 +14,37 @@ const thumbsContainer = {
|
|
|
14
14
|
marginTop: 10
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
export const DragDropImages = ({
|
|
18
|
+
texts,
|
|
18
19
|
files,
|
|
19
20
|
setFiles,
|
|
20
|
-
itemId,
|
|
21
21
|
setDeletedFiles,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
maxFiles,
|
|
23
|
+
accept,
|
|
24
|
+
onAcceptedFiles,
|
|
25
|
+
showPreview,
|
|
26
|
+
onDeleteFile,
|
|
27
|
+
onClearFiles,
|
|
28
|
+
maxSize,
|
|
29
|
+
errorMessages
|
|
30
|
+
}) =>
|
|
31
|
+
// props
|
|
32
|
+
{
|
|
33
|
+
const [cmp, setCmp] = useState(0);
|
|
34
|
+
const [max, setMax] = useState(0);
|
|
35
|
+
//const [thumbs, setThumbs] = useState("");
|
|
36
|
+
const theme = useTheme();
|
|
37
|
+
const {
|
|
38
|
+
getRootProps,
|
|
39
|
+
getInputProps,
|
|
40
|
+
fileRejections,
|
|
41
|
+
acceptedFiles,
|
|
42
|
+
isDragActive
|
|
43
|
+
} = useDropzone({
|
|
44
|
+
multiple: true,
|
|
45
|
+
accept: accept,
|
|
46
|
+
maxSize: maxSize,
|
|
47
|
+
maxFiles: maxFiles,
|
|
34
48
|
onDrop: (acceptedFiles) => {
|
|
35
49
|
setFiles(
|
|
36
50
|
acceptedFiles.map((file, index) =>
|
|
@@ -41,140 +55,118 @@ const DragDropItemImage = ({
|
|
|
41
55
|
);
|
|
42
56
|
}
|
|
43
57
|
});
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
_id: acceptedFiles[file]?._id
|
|
52
|
-
}
|
|
53
|
-
]);
|
|
54
|
-
try {
|
|
55
|
-
// await axios.post(
|
|
56
|
-
// `${process.env.NEXT_PUBLIC_QAWAIM_API_URL}/deleteImages`,
|
|
57
|
-
// {
|
|
58
|
-
// deletedFiles: [
|
|
59
|
-
// {
|
|
60
|
-
// img_url: acceptedFiles[file]?.img_url,
|
|
61
|
-
// _id: acceptedFiles[file]?._id
|
|
62
|
-
// }
|
|
63
|
-
// ],
|
|
64
|
-
// itemId: itemId
|
|
65
|
-
// }
|
|
66
|
-
// );
|
|
67
|
-
refetchSingleMenu();
|
|
68
|
-
acceptedFiles.splice(file, 1);
|
|
69
|
-
setFiles(acceptedFiles);
|
|
70
|
-
} catch (err) {
|
|
71
|
-
console.error(err);
|
|
72
|
-
}
|
|
73
|
-
console.log("accepted files after delete : ", acceptedFiles);
|
|
74
|
-
setCmp((old) => old + 1);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
// if (file.hasOwnProperty("_id")) {
|
|
78
|
-
// console.log("Yes");
|
|
79
|
-
// return;
|
|
80
|
-
// }
|
|
81
|
-
acceptedFiles.splice(file, 1);
|
|
82
|
-
|
|
83
|
-
setFiles(
|
|
84
|
-
acceptedFiles.map((f) =>
|
|
85
|
-
Object.assign(f, { preview: URL.createObjectURL(f) })
|
|
86
|
-
)
|
|
58
|
+
useEffect(
|
|
59
|
+
() => () => {
|
|
60
|
+
files?.forEach((file) => {
|
|
61
|
+
URL.revokeObjectURL(file.preview);
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
[files]
|
|
87
65
|
);
|
|
88
|
-
// setFiles(acceptedFiles);
|
|
89
|
-
};
|
|
90
|
-
useEffect(
|
|
91
|
-
() => () => {
|
|
92
|
-
files.forEach((file) => {
|
|
93
|
-
URL.revokeObjectURL(file.preview);
|
|
94
|
-
});
|
|
95
|
-
},
|
|
96
66
|
|
|
97
|
-
|
|
98
|
-
);
|
|
99
|
-
useEffect(() => {
|
|
100
|
-
if (files[0]?.hasOwnProperty("_id")) {
|
|
101
|
-
files?.map((file, index) => {
|
|
102
|
-
acceptedFiles.push({
|
|
103
|
-
preview: `https://qawaim-images.s3-ap-southeast-1.amazonaws.com/${file.image_url}`,
|
|
104
|
-
isFromDB: true,
|
|
105
|
-
_id: file._id,
|
|
106
|
-
img_url: file.image_url
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
console.log("accepted files : ", acceptedFiles);
|
|
67
|
+
useEffect(() => {
|
|
110
68
|
setFiles(acceptedFiles);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
69
|
+
}, [acceptedFiles, cmp]);
|
|
70
|
+
|
|
71
|
+
onClearFiles = () => {
|
|
72
|
+
acceptedFiles.length = 0;
|
|
73
|
+
acceptedFiles.splice(0, acceptedFiles.length);
|
|
74
|
+
setFiles([]);
|
|
114
75
|
};
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
76
|
+
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (maxSize > 0) {
|
|
79
|
+
const k = 1024;
|
|
80
|
+
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
81
|
+
const i = Math.floor(Math.log(maxSize) / Math.log(1024));
|
|
82
|
+
|
|
83
|
+
setMax(
|
|
84
|
+
parseFloat((maxSize / Math.pow(1024, i)).toFixed(2)) + " " + sizes[i]
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
}, [maxSize]);
|
|
88
|
+
const errs = fileRejections.map((rej, i) => {
|
|
89
|
+
return (
|
|
90
|
+
<div key={i}>
|
|
91
|
+
<div>{rej.file.name}</div>
|
|
92
|
+
<div>{rej.errors[0].code}</div>
|
|
93
|
+
</div>
|
|
94
|
+
);
|
|
95
|
+
});
|
|
96
|
+
const thumbs = files?.map((file, index) => (
|
|
97
|
+
<div style={{ position: "relative", margin: 10 }}>
|
|
98
|
+
<IconButton
|
|
99
|
+
onClick={(e) => {
|
|
100
|
+
e.stopPropagation();
|
|
101
|
+
acceptedFiles.splice(acceptedFiles.indexOf(file), 1);
|
|
102
|
+
setCmp(Math.random);
|
|
103
|
+
onDeleteFile(file);
|
|
104
|
+
}}
|
|
105
|
+
size="small"
|
|
106
|
+
variant="contained"
|
|
107
|
+
style={{
|
|
108
|
+
position: "absolute",
|
|
109
|
+
top: -10,
|
|
110
|
+
right: -10,
|
|
111
|
+
backgroundColor: theme.primaryActionColor,
|
|
112
|
+
color: "white",
|
|
113
|
+
padding: 3
|
|
114
|
+
}}
|
|
115
|
+
>
|
|
116
|
+
<CloseIcon fontSize="small" />
|
|
117
|
+
</IconButton>
|
|
118
|
+
<div
|
|
119
|
+
style={{
|
|
120
|
+
display: "flex",
|
|
121
|
+
justifyContent: "center",
|
|
122
|
+
alignItems: "center",
|
|
123
|
+
overflow: "hidden",
|
|
124
|
+
height: 100,
|
|
125
|
+
width: 100,
|
|
126
|
+
backgroundImage: `url(${file.preview})`,
|
|
127
|
+
backgroundSize: "cover",
|
|
128
|
+
backgroundPosition: "center",
|
|
129
|
+
border: "1px solid black"
|
|
130
|
+
}}
|
|
131
|
+
key={file.name}
|
|
132
|
+
/>
|
|
121
133
|
</div>
|
|
122
|
-
);
|
|
123
|
-
});
|
|
134
|
+
));
|
|
124
135
|
|
|
125
|
-
|
|
126
|
-
<Badge
|
|
127
|
-
key={index}
|
|
128
|
-
onClick={(e) => {
|
|
129
|
-
e.preventDefault();
|
|
130
|
-
e.stopPropagation();
|
|
131
|
-
console.log("Clicking", index);
|
|
132
|
-
handleRemoveFile(index);
|
|
133
|
-
}}
|
|
134
|
-
badgeContent={<CloseIcon fontSize="small" />}
|
|
135
|
-
color="primary"
|
|
136
|
-
style={{
|
|
137
|
-
margin: 10,
|
|
138
|
-
width: 100,
|
|
139
|
-
height: 100
|
|
140
|
-
}}
|
|
141
|
-
>
|
|
142
|
-
<div
|
|
143
|
-
style={{
|
|
144
|
-
display: "flex",
|
|
145
|
-
justifyContent: "center",
|
|
146
|
-
alignItems: "center",
|
|
147
|
-
overflow: "hidden",
|
|
148
|
-
height: 100,
|
|
149
|
-
width: 100,
|
|
150
|
-
backgroundImage: `url(${file.preview})`,
|
|
151
|
-
backgroundSize: "cover",
|
|
152
|
-
backgroundPosition: "center"
|
|
153
|
-
}}
|
|
154
|
-
key={file.name}
|
|
155
|
-
/>
|
|
156
|
-
</Badge>
|
|
157
|
-
));
|
|
136
|
+
console.log("error", fileRejections);
|
|
158
137
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
138
|
+
return (
|
|
139
|
+
<Container
|
|
140
|
+
variant="drop-area"
|
|
162
141
|
{...getRootProps({
|
|
163
|
-
|
|
164
|
-
console.log("e : ", e);
|
|
165
|
-
e.preventDefault(), console.log("khobza");
|
|
166
|
-
},
|
|
167
|
-
style: { height: "100%", width: "100%", padding: 10 }
|
|
142
|
+
style: { backgroundColor: isDragActive && "white" }
|
|
168
143
|
})}
|
|
169
144
|
>
|
|
170
145
|
<input {...getInputProps()} />
|
|
171
|
-
<
|
|
172
|
-
<
|
|
173
|
-
{
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
146
|
+
<Typography>Click here or drop files here to upload</Typography>
|
|
147
|
+
<Typography>Max file size is {max}</Typography>
|
|
148
|
+
{acceptedFiles.length > 0 && (
|
|
149
|
+
<Button
|
|
150
|
+
style={{ color: "black" }}
|
|
151
|
+
onClick={(e) => {
|
|
152
|
+
e.stopPropagation();
|
|
153
|
+
onClearFiles(acceptedFiles);
|
|
154
|
+
}}
|
|
155
|
+
>
|
|
156
|
+
Clear All
|
|
157
|
+
</Button>
|
|
158
|
+
)}
|
|
179
159
|
|
|
180
|
-
|
|
160
|
+
{thumbs && showPreview ? <aside style={thumbsContainer}>{thumbs}</aside> : null}
|
|
161
|
+
{fileRejections[0]?.errors[0]?.code === "too-many-files" ? (
|
|
162
|
+
// <Typography variant="">{texts.tooManyFiles}</Typography>
|
|
163
|
+
<HawaAlert text={texts.tooManyFiles} severity="error" />
|
|
164
|
+
) : fileRejections[0]?.errors[0]?.code === "file-too-large" ? (
|
|
165
|
+
<HawaAlert text={texts.fileTooLarge} severity="error" />
|
|
166
|
+
) : (
|
|
167
|
+
errs
|
|
168
|
+
)}
|
|
169
|
+
{}
|
|
170
|
+
</Container>
|
|
171
|
+
);
|
|
172
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { MoreVert } from "@mui/icons-material";
|
|
2
|
+
import { Container, Stack } from "@mui/material";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
export const DraggableCard = (props) => {
|
|
6
|
+
return (
|
|
7
|
+
<Stack
|
|
8
|
+
variant="card"
|
|
9
|
+
direction="row"
|
|
10
|
+
maxWidth={props.maxWidth}
|
|
11
|
+
style={{ paddingLeft: 5 }}
|
|
12
|
+
>
|
|
13
|
+
<div
|
|
14
|
+
style={{
|
|
15
|
+
// backgroundColor: "blue",
|
|
16
|
+
display: "flex",
|
|
17
|
+
alignItems: "center",
|
|
18
|
+
// paddingRight: 5,
|
|
19
|
+
borderRight: "1px solid grey",
|
|
20
|
+
marginRight: 20
|
|
21
|
+
}}
|
|
22
|
+
>
|
|
23
|
+
<MoreVert />
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div
|
|
27
|
+
style={{
|
|
28
|
+
// backgroundColor: "red",
|
|
29
|
+
width: "100%"
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
{props.children}
|
|
33
|
+
</div>
|
|
34
|
+
</Stack>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import Select from "react-select";
|
|
2
|
+
import Creatable from "react-select/creatable";
|
|
3
|
+
|
|
4
|
+
export default function HawaSelectInput(props) {
|
|
5
|
+
return (
|
|
6
|
+
<>
|
|
7
|
+
{!props.isCreatable && (
|
|
8
|
+
<Select
|
|
9
|
+
options={props.options}
|
|
10
|
+
isClearable={props.isClearable}
|
|
11
|
+
isMulti={props.isMulti}
|
|
12
|
+
isSearchable={props.isSearchable}
|
|
13
|
+
onChange={(newValue, action) => props.onChange(newValue, action)}
|
|
14
|
+
/>
|
|
15
|
+
)}
|
|
16
|
+
{props.isCreatable && (
|
|
17
|
+
<Creatable
|
|
18
|
+
options={props.options}
|
|
19
|
+
isClearable={props.isClearable}
|
|
20
|
+
isMulti={props.isMulti}
|
|
21
|
+
isSearchable={props.isSearchable}
|
|
22
|
+
onChange={(newValue, action) => props.onChange(newValue, action)}
|
|
23
|
+
onInputChange={(newValue, action) =>
|
|
24
|
+
props.onInputChange(newValue, action)
|
|
25
|
+
}
|
|
26
|
+
/>
|
|
27
|
+
)}
|
|
28
|
+
</>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -1,12 +1,41 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
2
|
import Snackbar from "@mui/material/Snackbar";
|
|
3
3
|
import AlertTitle from "@mui/material/AlertTitle";
|
|
4
4
|
import Alert from "@mui/material/Alert";
|
|
5
|
+
import { IconButton } from "@mui/material";
|
|
6
|
+
import CloseIcon from "@mui/icons-material/Close";
|
|
5
7
|
|
|
6
8
|
export const HawaSnackbar = (props) => {
|
|
9
|
+
|
|
10
|
+
const [position, setPosition] = useState({vertical : "", horizontal : ""});
|
|
11
|
+
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if(props.position){
|
|
14
|
+
const p = props.position.split("-");
|
|
15
|
+
setPosition({vertical : p[0], horizontal : p[1]});
|
|
16
|
+
}
|
|
17
|
+
}, [props.position])
|
|
18
|
+
|
|
7
19
|
return (
|
|
8
|
-
<Snackbar
|
|
9
|
-
|
|
20
|
+
<Snackbar
|
|
21
|
+
open={props.open}
|
|
22
|
+
autoHideDuration={props.duration ? props.duration : null}
|
|
23
|
+
onClose={props.handleClose}
|
|
24
|
+
anchorOrigin={position}
|
|
25
|
+
action={
|
|
26
|
+
<>
|
|
27
|
+
<IconButton
|
|
28
|
+
aria-label="close"
|
|
29
|
+
style={{color: "black"}}
|
|
30
|
+
sx={{ p: 0.5 }}
|
|
31
|
+
onClick={props.handleClose}
|
|
32
|
+
>
|
|
33
|
+
<CloseIcon />
|
|
34
|
+
</IconButton>
|
|
35
|
+
</>
|
|
36
|
+
}
|
|
37
|
+
>
|
|
38
|
+
<Alert icon={false} severity={props.severity} onClose={props.isClosable ? props.handleClose : null}>
|
|
10
39
|
{props.title && <AlertTitle>{props.title}</AlertTitle>}
|
|
11
40
|
{props.text}
|
|
12
41
|
</Alert>
|
package/src/elements/index.js
CHANGED
package/src/index.js
CHANGED