@wavelengthusaf/components 1.2.1 → 1.2.3
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/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +14 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4995,32 +4995,30 @@ import Snackbar2 from "@mui/material/Snackbar";
|
|
|
4995
4995
|
import IconButton5 from "@mui/material/IconButton";
|
|
4996
4996
|
import CloseIcon3 from "@mui/icons-material/Close";
|
|
4997
4997
|
import SnackbarContent2 from "@mui/material/SnackbarContent";
|
|
4998
|
-
|
|
4999
|
-
let show = props.show;
|
|
5000
|
-
const setShow = props.setShow;
|
|
4998
|
+
function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width: width2, message, customVertyAlign, toggleShow }) {
|
|
5001
4999
|
const handleClose = () => {
|
|
5002
|
-
|
|
5000
|
+
toggleShow(false);
|
|
5003
5001
|
};
|
|
5004
|
-
const durationMs =
|
|
5002
|
+
const durationMs = durationSb ? durationSb * 1e3 : 4e3;
|
|
5005
5003
|
let bgColor = "";
|
|
5006
|
-
if (
|
|
5004
|
+
if (type == "success") {
|
|
5007
5005
|
bgColor = "#25ab21";
|
|
5008
|
-
} else if (
|
|
5006
|
+
} else if (type == "error") {
|
|
5009
5007
|
bgColor = "#FF4646";
|
|
5010
|
-
} else if (
|
|
5008
|
+
} else if (type == "disabled") {
|
|
5011
5009
|
bgColor = "#737373";
|
|
5012
5010
|
}
|
|
5013
|
-
const sIcon =
|
|
5011
|
+
const sIcon = icon ? icon : "";
|
|
5014
5012
|
return /* @__PURE__ */ React31.createElement(
|
|
5015
5013
|
Snackbar2,
|
|
5016
5014
|
{
|
|
5017
|
-
sx: { marginTop:
|
|
5015
|
+
sx: { marginTop: customVertyAlign ? `${customVertyAlign}` : "", zIndex: 1400 },
|
|
5018
5016
|
open: show,
|
|
5019
5017
|
onClose: handleClose,
|
|
5020
5018
|
autoHideDuration: durationMs,
|
|
5021
5019
|
anchorOrigin: {
|
|
5022
|
-
vertical:
|
|
5023
|
-
horizontal:
|
|
5020
|
+
vertical: vertyAlign ? vertyAlign : "top",
|
|
5021
|
+
horizontal: horryAlign ? horryAlign : "center"
|
|
5024
5022
|
}
|
|
5025
5023
|
},
|
|
5026
5024
|
/* @__PURE__ */ React31.createElement(
|
|
@@ -5038,16 +5036,16 @@ var WavelengthStandardSnackbar = (props) => {
|
|
|
5038
5036
|
style: {
|
|
5039
5037
|
display: "grid",
|
|
5040
5038
|
gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr",
|
|
5041
|
-
width:
|
|
5039
|
+
width: width2
|
|
5042
5040
|
}
|
|
5043
5041
|
},
|
|
5044
|
-
/* @__PURE__ */ React31.createElement("div", { style: { marginTop: 4, gridColumnStart: 2, gridColumnEnd: 5, textAlign: "center", display: "flex", flexDirection: "row", justifyContent: "center" }, id: "snackbar" }, /* @__PURE__ */ React31.createElement("div", null, sIcon), /* @__PURE__ */ React31.createElement("div", { style: { fontSize: "1rem", marginLeft: "10px" } },
|
|
5045
|
-
/* @__PURE__ */ React31.createElement("div", { style: { gridColumnStart: 6 } }, " ", /* @__PURE__ */ React31.createElement(IconButton5, { size: "small", "aria-label": "close", color: "inherit"
|
|
5042
|
+
/* @__PURE__ */ React31.createElement("div", { style: { marginTop: 4, gridColumnStart: 2, gridColumnEnd: 5, textAlign: "center", display: "flex", flexDirection: "row", justifyContent: "center" }, id: "snackbar" }, /* @__PURE__ */ React31.createElement("div", null, sIcon), /* @__PURE__ */ React31.createElement("div", { style: { fontSize: "1rem", marginLeft: "10px" } }, message ? message : "Insert Message Here")),
|
|
5043
|
+
/* @__PURE__ */ React31.createElement("div", { style: { gridColumnStart: 6 } }, " ", /* @__PURE__ */ React31.createElement(IconButton5, { size: "small", "aria-label": "close", color: "inherit" }, /* @__PURE__ */ React31.createElement(CloseIcon3, { fontSize: "small" })))
|
|
5046
5044
|
)
|
|
5047
5045
|
}
|
|
5048
5046
|
)
|
|
5049
5047
|
);
|
|
5050
|
-
}
|
|
5048
|
+
}
|
|
5051
5049
|
export {
|
|
5052
5050
|
AceOfSpadesComponent,
|
|
5053
5051
|
AppLogo,
|