jy-headless 0.2.9 → 0.2.10
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/cjs/buttons/Button.d.ts +1 -1
- package/cjs/buttons/Button.js +8 -8
- package/cjs/index.js +1 -1
- package/esm/buttons/Button.d.ts +1 -1
- package/esm/buttons/Button.js +3 -5
- package/package.json +1 -1
- package/version.txt +1 -1
package/cjs/buttons/Button.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ButtonProps } from '../types
|
|
1
|
+
import type { ButtonProps } from '../types';
|
|
2
2
|
declare const Button: ({ onClick, debounce, loading, readOnly, disabled, children, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Button;
|
package/cjs/buttons/Button.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
var jsxRuntime = require('../_virtual/jsx-runtime.js');
|
|
5
|
-
var require$$0 = require('react');
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var react = require('react');
|
|
7
|
+
|
|
8
|
+
const Button = ({ onClick, debounce = false, loading = false, readOnly = false, disabled = false, children, ...props }) => {
|
|
9
|
+
const timer = react.useRef(0);
|
|
10
10
|
const handleClick = (() => {
|
|
11
11
|
if (!onClick)
|
|
12
12
|
return;
|
|
@@ -18,7 +18,7 @@ const Button = (_a) => {
|
|
|
18
18
|
}
|
|
19
19
|
return onClick;
|
|
20
20
|
})();
|
|
21
|
-
return (jsxRuntime.
|
|
21
|
+
return (jsxRuntime.jsx("button", { onClick: handleClick, disabled: disabled || loading || readOnly, ...props, children: children }));
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
exports.default = Button;
|
package/cjs/index.js
CHANGED
package/esm/buttons/Button.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ButtonProps } from '../types
|
|
1
|
+
import type { ButtonProps } from '../types';
|
|
2
2
|
declare const Button: ({ onClick, debounce, loading, readOnly, disabled, children, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Button;
|
package/esm/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/package.json
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.10
|