next-helios-fe 1.7.13 → 1.7.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-helios-fe",
3
- "version": "1.7.13",
3
+ "version": "1.7.15",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -47,10 +47,10 @@ export const Button: React.FC<ButtonProps> = ({
47
47
  const width = options?.width === "fit" ? "w-fit" : "w-full";
48
48
  const height =
49
49
  options?.height === "short"
50
- ? "py-1 gap-2"
50
+ ? "h-[35px] gap-2"
51
51
  : options?.height === "high"
52
- ? "py-2 gap-4"
53
- : "py-1.5 gap-2";
52
+ ? "h-[43px] gap-4"
53
+ : "h-[39px] gap-2";
54
54
  const position =
55
55
  options?.position === "center"
56
56
  ? "justify-center"
@@ -68,7 +68,12 @@ export const Button: React.FC<ButtonProps> = ({
68
68
  {...rest}
69
69
  >
70
70
  {loading ? (
71
- <Icon icon="mingcute:loading-fill" className="text-2xl animate-spin" />
71
+ <Icon
72
+ icon="mingcute:loading-fill"
73
+ className={`animate-spin ${
74
+ options?.height === "high" ? "text-2xl" : "text-xl"
75
+ }`}
76
+ />
72
77
  ) : (
73
78
  children
74
79
  )}
@@ -64,6 +64,7 @@ interface TableProps {
64
64
  }[]
65
65
  ) => void;
66
66
  };
67
+ loading?: boolean;
67
68
  actionColumn?: (e?: any) => React.ReactNode;
68
69
  }
69
70
 
@@ -77,6 +78,7 @@ export const Table: TableComponentProps = ({
77
78
  data,
78
79
  options,
79
80
  checkbox,
81
+ loading,
80
82
  actionColumn,
81
83
  }) => {
82
84
  const paginationRef = useRef<HTMLDivElement>(null);
@@ -709,12 +711,19 @@ export const Table: TableComponentProps = ({
709
711
  </tr>
710
712
  </thead>
711
713
  <tbody className="divide-y">
712
- {filteredData && filteredData.length !== 0 && dataArr}
714
+ {!loading && filteredData && filteredData.length !== 0 && dataArr}
713
715
  </tbody>
714
716
  </table>
715
- {(!filteredData || filteredData.length === 0) && (
717
+ {(loading || !filteredData || filteredData.length === 0) && (
716
718
  <div className="flex justify-center items-center px-4 py-1.5 h-full bg-secondary-bg text-center whitespace-nowrap">
717
- <span>No data found</span>
719
+ {loading ? (
720
+ <Icon
721
+ icon="mingcute:loading-fill"
722
+ className="text-3xl text-primary animate-spin"
723
+ />
724
+ ) : (
725
+ <span>No data found</span>
726
+ )}
718
727
  </div>
719
728
  )}
720
729
  </div>