refactor: tweaks styles for providers table

This commit is contained in:
Pablo Lara
2024-09-11 15:03:51 +02:00
parent 5163bcb72c
commit 67f572285b
7 changed files with 35 additions and 13 deletions
+16
View File
@@ -0,0 +1,16 @@
"use client";
import { useEffect, useState } from "react";
export const CustomLoader = (props: { size?: "small" }) => {
const [loadingSpinner, setloadingSpinner] = useState(0);
const loadingChars = "|/-\\";
const textClasses = `w-xs px-xs ${props.size === "small" ? "!text-s" : ""}`;
useEffect(() => {
setTimeout(() => setloadingSpinner(loadingSpinner + 1), 150);
}, [loadingSpinner]);
return <p className={textClasses}>{loadingChars[loadingSpinner % 4]}</p>;
};
+1
View File
@@ -1,3 +1,4 @@
export * from "./CustomBox";
export * from "./CustomButtonClientAction";
export * from "./CustomInput";
export * from "./CustomLoader";