@cripty2001/utils 0.0.111 → 0.0.112
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/dist/react-ui/button.js +13 -1
- package/package.json +1 -1
package/dist/react-ui/button.js
CHANGED
|
@@ -21,5 +21,17 @@ function Button({ title, onClick, className }) {
|
|
|
21
21
|
.catch(e => setError(e instanceof Error ? e.message : "Unknown error"))
|
|
22
22
|
.finally(() => setLoading(false));
|
|
23
23
|
};
|
|
24
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { onClick: handleClick, className:
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { onClick: handleClick, className: className, style: {
|
|
25
|
+
display: 'flex',
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
justifyContent: 'center',
|
|
28
|
+
textAlign: 'center',
|
|
29
|
+
cursor: 'pointer',
|
|
30
|
+
}, children: loading ? (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { style: {
|
|
31
|
+
width: '1rem',
|
|
32
|
+
height: '1rem',
|
|
33
|
+
animation: 'spin 1s linear infinite',
|
|
34
|
+
} }) : (0, jsx_runtime_1.jsx)("div", { children: title }) }), error && (0, jsx_runtime_1.jsx)("div", { style: {
|
|
35
|
+
color: '#ef4444'
|
|
36
|
+
}, children: error })] }));
|
|
25
37
|
}
|
package/package.json
CHANGED