@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.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
- var WavelengthStandardSnackbar = (props) => {
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
- setShow(false);
5000
+ toggleShow(false);
5003
5001
  };
5004
- const durationMs = props.durationSb ? props.durationSb * 1e3 : 4e3;
5002
+ const durationMs = durationSb ? durationSb * 1e3 : 4e3;
5005
5003
  let bgColor = "";
5006
- if (props.type == "success") {
5004
+ if (type == "success") {
5007
5005
  bgColor = "#25ab21";
5008
- } else if (props.type == "error") {
5006
+ } else if (type == "error") {
5009
5007
  bgColor = "#FF4646";
5010
- } else if (props.type == "disabled") {
5008
+ } else if (type == "disabled") {
5011
5009
  bgColor = "#737373";
5012
5010
  }
5013
- const sIcon = props.icon ? props.icon : "";
5011
+ const sIcon = icon ? icon : "";
5014
5012
  return /* @__PURE__ */ React31.createElement(
5015
5013
  Snackbar2,
5016
5014
  {
5017
- sx: { marginTop: props.customVertyAlign ? `${props.customVertyAlign}` : "", zIndex: 1400 },
5015
+ sx: { marginTop: customVertyAlign ? `${customVertyAlign}` : "", zIndex: 1400 },
5018
5016
  open: show,
5019
5017
  onClose: handleClose,
5020
5018
  autoHideDuration: durationMs,
5021
5019
  anchorOrigin: {
5022
- vertical: props.vertyAlign ? props.vertyAlign : "top",
5023
- horizontal: props.horryAlign ? props.horryAlign : "center"
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: props.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" } }, props.message ? props.message : "Insert Message Here")),
5045
- /* @__PURE__ */ React31.createElement("div", { style: { gridColumnStart: 6 } }, " ", /* @__PURE__ */ React31.createElement(IconButton5, { size: "small", "aria-label": "close", color: "inherit", onClick: handleClose }, /* @__PURE__ */ React31.createElement(CloseIcon3, { fontSize: "small" })))
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,