next-helios-fe 1.7.22 → 1.7.23

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.22",
3
+ "version": "1.7.23",
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
- ? "h-[35px] gap-2"
50
+ ? "py-1 gap-2"
51
51
  : options?.height === "high"
52
- ? "h-[43px] gap-4"
53
- : "h-[39px] gap-2";
52
+ ? "py-2 gap-4"
53
+ : "py-1.5 gap-2";
54
54
  const position =
55
55
  options?.position === "center"
56
56
  ? "justify-center"
@@ -64,19 +64,26 @@ export const Button: React.FC<ButtonProps> = ({
64
64
 
65
65
  return (
66
66
  <button
67
- className={`relative flex ${position} items-center ${width} px-3 ${height} rounded-md text-left ${variant} ${border} ${isActive} select-none disabled:pointer-events-none ${className}`}
67
+ className={`relative ${width} px-3 ${height} rounded-md text-left ${variant} ${border} ${isActive} select-none disabled:pointer-events-none ${className}`}
68
68
  disabled={loading || rest.disabled}
69
69
  {...rest}
70
70
  >
71
- {loading ? (
72
- <Icon
73
- icon="mingcute:loading-fill"
74
- className={`animate-spin ${
75
- options?.height === "high" ? "text-2xl" : "text-xl"
76
- }`}
77
- />
78
- ) : (
79
- children
71
+ <div
72
+ className={`flex ${position} items-center w-full h-full ${
73
+ loading && "invisible"
74
+ }`}
75
+ >
76
+ {children}
77
+ </div>
78
+ {loading && (
79
+ <div className="absolute left-0 top-0 flex justify-center items-center w-full h-full">
80
+ <Icon
81
+ icon="mingcute:loading-fill"
82
+ className={`animate-spin ${
83
+ options?.height === "high" ? "text-2xl" : "text-xl"
84
+ }`}
85
+ />
86
+ </div>
80
87
  )}
81
88
  {tooltip && <Tooltip id={rest.id as string} content={tooltip.content} />}
82
89
  </button>