next-helios-fe 1.7.20 → 1.7.22
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
@@ -65,6 +65,7 @@ export const Button: React.FC<ButtonProps> = ({
|
|
65
65
|
return (
|
66
66
|
<button
|
67
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}`}
|
68
|
+
disabled={loading || rest.disabled}
|
68
69
|
{...rest}
|
69
70
|
>
|
70
71
|
{loading ? (
|
@@ -15,6 +15,7 @@ interface DialogProps {
|
|
15
15
|
timeout?: 3000 | 5000 | 7000 | 10000;
|
16
16
|
};
|
17
17
|
open: boolean;
|
18
|
+
loading?: boolean;
|
18
19
|
onClose: () => void;
|
19
20
|
}
|
20
21
|
|
@@ -24,6 +25,7 @@ export const Dialog: React.FC<DialogProps> = ({
|
|
24
25
|
action,
|
25
26
|
options,
|
26
27
|
open,
|
28
|
+
loading,
|
27
29
|
onClose,
|
28
30
|
}) => {
|
29
31
|
const actionVariant =
|
@@ -82,7 +84,8 @@ export const Dialog: React.FC<DialogProps> = ({
|
|
82
84
|
<div className="flex justify-end gap-4">
|
83
85
|
<button
|
84
86
|
type="button"
|
85
|
-
className={actionVariant}
|
87
|
+
className={`disabled:text-slate-400 disabled:pointer-events-none ${actionVariant}`}
|
88
|
+
disabled={loading}
|
86
89
|
onClick={() => {
|
87
90
|
action.onClick && action.onClick();
|
88
91
|
}}
|
@@ -100,7 +103,6 @@ export const Dialog: React.FC<DialogProps> = ({
|
|
100
103
|
</button>
|
101
104
|
</div>
|
102
105
|
</div>
|
103
|
-
|
104
106
|
{options?.timeout && (
|
105
107
|
<div className="w-full h-1.5 bg-primary-transparent">
|
106
108
|
<div className={`h-full bg-primary ${shrinkAnimation}`}></div>
|