@wavelengthusaf/components 1.2.2 → 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 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4995,33 +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
|
-
console.log(props.show);
|
|
5000
|
-
const show = props.show;
|
|
5001
|
-
const setShow = props.setShow;
|
|
4998
|
+
function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width: width2, message, customVertyAlign, toggleShow }) {
|
|
5002
4999
|
const handleClose = () => {
|
|
5003
|
-
|
|
5000
|
+
toggleShow(false);
|
|
5004
5001
|
};
|
|
5005
|
-
const durationMs =
|
|
5002
|
+
const durationMs = durationSb ? durationSb * 1e3 : 4e3;
|
|
5006
5003
|
let bgColor = "";
|
|
5007
|
-
if (
|
|
5004
|
+
if (type == "success") {
|
|
5008
5005
|
bgColor = "#25ab21";
|
|
5009
|
-
} else if (
|
|
5006
|
+
} else if (type == "error") {
|
|
5010
5007
|
bgColor = "#FF4646";
|
|
5011
|
-
} else if (
|
|
5008
|
+
} else if (type == "disabled") {
|
|
5012
5009
|
bgColor = "#737373";
|
|
5013
5010
|
}
|
|
5014
|
-
const sIcon =
|
|
5011
|
+
const sIcon = icon ? icon : "";
|
|
5015
5012
|
return /* @__PURE__ */ React31.createElement(
|
|
5016
5013
|
Snackbar2,
|
|
5017
5014
|
{
|
|
5018
|
-
sx: { marginTop:
|
|
5015
|
+
sx: { marginTop: customVertyAlign ? `${customVertyAlign}` : "", zIndex: 1400 },
|
|
5019
5016
|
open: show,
|
|
5020
5017
|
onClose: handleClose,
|
|
5021
5018
|
autoHideDuration: durationMs,
|
|
5022
5019
|
anchorOrigin: {
|
|
5023
|
-
vertical:
|
|
5024
|
-
horizontal:
|
|
5020
|
+
vertical: vertyAlign ? vertyAlign : "top",
|
|
5021
|
+
horizontal: horryAlign ? horryAlign : "center"
|
|
5025
5022
|
}
|
|
5026
5023
|
},
|
|
5027
5024
|
/* @__PURE__ */ React31.createElement(
|
|
@@ -5039,16 +5036,16 @@ var WavelengthStandardSnackbar = (props) => {
|
|
|
5039
5036
|
style: {
|
|
5040
5037
|
display: "grid",
|
|
5041
5038
|
gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr",
|
|
5042
|
-
width:
|
|
5039
|
+
width: width2
|
|
5043
5040
|
}
|
|
5044
5041
|
},
|
|
5045
|
-
/* @__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" } },
|
|
5046
|
-
/* @__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" })))
|
|
5047
5044
|
)
|
|
5048
5045
|
}
|
|
5049
5046
|
)
|
|
5050
5047
|
);
|
|
5051
|
-
}
|
|
5048
|
+
}
|
|
5052
5049
|
export {
|
|
5053
5050
|
AceOfSpadesComponent,
|
|
5054
5051
|
AppLogo,
|