jy-headless 0.2.10 → 0.2.12
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/buttons/Button.js +3 -5
- package/cjs/buttons/Button.js +1 -3
- package/cjs/index.js +1 -1
- package/package.json +1 -1
- package/version.txt +1 -1
package/buttons/Button.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { j as jsxRuntimeExports } from '../_virtual/jsx-runtime.js';
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import { useRef } from 'react';
|
|
4
3
|
|
|
5
|
-
const Button = (
|
|
6
|
-
var { onClick, debounce = false, loading = false, readOnly = false, disabled = false, children } = _a, props = __rest(_a, ["onClick", "debounce", "loading", "readOnly", "disabled", "children"]);
|
|
4
|
+
const Button = ({ onClick, debounce = false, loading = false, readOnly = false, disabled = false, children, ...props }) => {
|
|
7
5
|
const timer = useRef(0);
|
|
8
6
|
const handleClick = (() => {
|
|
9
7
|
if (!onClick)
|
|
@@ -16,7 +14,7 @@ const Button = (_a) => {
|
|
|
16
14
|
}
|
|
17
15
|
return onClick;
|
|
18
16
|
})();
|
|
19
|
-
return (
|
|
17
|
+
return (jsx("button", { onClick: handleClick, disabled: disabled || loading || readOnly, ...props, children: children }));
|
|
20
18
|
};
|
|
21
19
|
|
|
22
20
|
export { Button as default };
|
package/cjs/buttons/Button.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
4
|
var react = require('react');
|
|
7
5
|
|
|
@@ -21,4 +19,4 @@ const Button = ({ onClick, debounce = false, loading = false, readOnly = false,
|
|
|
21
19
|
return (jsxRuntime.jsx("button", { onClick: handleClick, disabled: disabled || loading || readOnly, ...props, children: children }));
|
|
22
20
|
};
|
|
23
21
|
|
|
24
|
-
exports
|
|
22
|
+
module.exports = Button;
|
package/cjs/index.js
CHANGED
package/package.json
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.12
|