@0xchain/copy-button 1.0.0 → 1.1.0-beta.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAIA,UAAU,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AACD,QAAA,MAAM,UAAU,GAAI,uCAAyD,eAAe,4CAqB3F,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAIA,UAAU,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AACD,QAAA,MAAM,UAAU,GAAI,uCAAiE,eAAe,4CAqBnG,CAAC;AAEF,eAAe,UAAU,CAAC"}
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  'use client';
2
2
  import { jsx as e } from "react/jsx-runtime";
3
3
  import { useState as n } from "react";
4
- import { Check as l, Copy as p } from "lucide-react";
4
+ import { Check as p, Copy as l } from "lucide-react";
5
5
  import { twMerge as m } from "tailwind-merge";
6
- const d = ({ content: r, className: s, iconClassName: t = "text-subtitle" }) => {
7
- const [a, o] = n(!1), i = async () => {
6
+ const C = ({ content: r, className: s, iconClassName: o = "text-muted-foreground" }) => {
7
+ const [a, t] = n(!1), i = async () => {
8
8
  try {
9
- await navigator.clipboard.writeText(r), o(!0), setTimeout(() => {
10
- o(!1);
9
+ await navigator.clipboard.writeText(r), t(!0), setTimeout(() => {
10
+ t(!1);
11
11
  }, 1e3);
12
12
  } catch (c) {
13
13
  console.error("复制失败:", c);
14
14
  }
15
15
  };
16
- return /* @__PURE__ */ e("span", { className: m("inline-block w-4 cursor-pointer", s), onClick: i, children: a ? /* @__PURE__ */ e(l, { size: 16, className: t }) : /* @__PURE__ */ e(p, { size: 16, className: t }) });
16
+ return /* @__PURE__ */ e("span", { className: m("inline-block w-4 cursor-pointer", s), onClick: i, children: a ? /* @__PURE__ */ e(p, { size: 16, className: o }) : /* @__PURE__ */ e(l, { size: 16, className: o }) });
17
17
  };
18
18
  export {
19
- d as default
19
+ C as default
20
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xchain/copy-button",
3
- "version": "1.0.0",
3
+ "version": "1.1.0-beta.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",