@arcblock/ux 2.4.47 → 2.4.48

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.
@@ -30,7 +30,11 @@ function useCopy(_ref) {
30
30
  const [copied, setCopied] = (0, _react.useState)(false);
31
31
  const containerRef = (0, _react.useRef)();
32
32
 
33
- const copy = () => {
33
+ const copy = e => {
34
+ if (e) {
35
+ e.stopPropagation();
36
+ }
37
+
34
38
  (0, _copyToClipboard.default)(content || containerRef.current.textContent);
35
39
  setCopied(true);
36
40
  };
@@ -84,8 +84,8 @@ function ClickToCopy(props) {
84
84
  width
85
85
  } = (0, _useWindowSize.default)();
86
86
 
87
- const onCopy = () => {
88
- copy();
87
+ const onCopy = e => {
88
+ copy(e);
89
89
 
90
90
  if (width < 600) {
91
91
  _Toast.default.success(_copiedTip);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "2.4.47",
3
+ "version": "2.4.48",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -47,11 +47,11 @@
47
47
  "react": ">=18.1.0",
48
48
  "react-ga": "^2.7.0"
49
49
  },
50
- "gitHead": "55b58c6300a6c7d5e31295b6d27255c41732340b",
50
+ "gitHead": "7ba461919bba281ba700a2388e4419676b647a01",
51
51
  "dependencies": {
52
52
  "@arcblock/did-motif": "^1.1.10",
53
- "@arcblock/icons": "^2.4.47",
54
- "@arcblock/react-hooks": "^2.4.47",
53
+ "@arcblock/icons": "^2.4.48",
54
+ "@arcblock/react-hooks": "^2.4.48",
55
55
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
56
56
  "@emotion/react": "^11.10.4",
57
57
  "@emotion/styled": "^11.10.4",
@@ -15,7 +15,11 @@ const translations = {
15
15
  export default function useCopy({ content, locale = 'en' }) {
16
16
  const [copied, setCopied] = useState(false);
17
17
  const containerRef = useRef();
18
- const copy = () => {
18
+ const copy = (e) => {
19
+ if (e) {
20
+ e.stopPropagation();
21
+ }
22
+
19
23
  Copy(content || containerRef.current.textContent);
20
24
  setCopied(true);
21
25
  };
@@ -18,8 +18,9 @@ export default function ClickToCopy(props) {
18
18
 
19
19
  const { width } = useWindowSize();
20
20
 
21
- const onCopy = () => {
22
- copy();
21
+ const onCopy = (e) => {
22
+ copy(e);
23
+
23
24
  if (width < 600) {
24
25
  Toast.success(_copiedTip);
25
26
  }