@embedreach/components 0.3.38 → 0.3.39

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.
@@ -25476,20 +25476,20 @@ const SpinLoader = ({
25476
25476
  text,
25477
25477
  textSpeed = 2e3,
25478
25478
  // Default 2 seconds per text
25479
- textColor = "black"
25479
+ textColor = "black",
25480
+ footer
25480
25481
  }) => {
25481
25482
  const [currentTextIndex, setCurrentTextIndex] = useState(0);
25482
25483
  const textArray = Array.isArray(text) ? text : text ? [text] : [];
25483
25484
  useEffect(() => {
25484
25485
  if (textArray.length <= 1) return;
25485
- if (currentTextIndex >= textArray.length - 1) return;
25486
25486
  const interval = setInterval(() => {
25487
25487
  setCurrentTextIndex(
25488
- (current) => current < textArray.length - 1 ? current + 1 : current
25488
+ (current) => current < textArray.length - 1 ? current + 1 : 0
25489
25489
  );
25490
25490
  }, textSpeed);
25491
25491
  return () => clearInterval(interval);
25492
- }, [textArray.length, textSpeed, currentTextIndex]);
25492
+ }, [textArray.length, textSpeed]);
25493
25493
  return /* @__PURE__ */ jsx("div", { className: "flex flex-col justify-center items-center h-full", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
25494
25494
  /* @__PURE__ */ jsxs(
25495
25495
  "div",
@@ -25519,6 +25519,7 @@ const SpinLoader = ({
25519
25519
  },
25520
25520
  currentTextIndex
25521
25521
  ),
25522
+ footer && /* @__PURE__ */ jsx("div", { className: "text-center mt-6", children: footer }),
25522
25523
  /* @__PURE__ */ jsx("style", { children: `
25523
25524
  .loader-container {
25524
25525
  position: relative;