@julseb-lib/react 0.1.43 → 0.1.45
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/index.js
CHANGED
|
@@ -11493,10 +11493,12 @@ import { jsx as jsx129, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
|
11493
11493
|
var CodeContainer = (_a) => {
|
|
11494
11494
|
var _b = _a, {
|
|
11495
11495
|
children,
|
|
11496
|
-
code
|
|
11496
|
+
code,
|
|
11497
|
+
showNumbers
|
|
11497
11498
|
} = _b, rest = __objRest(_b, [
|
|
11498
11499
|
"children",
|
|
11499
|
-
"code"
|
|
11500
|
+
"code",
|
|
11501
|
+
"showNumbers"
|
|
11500
11502
|
]);
|
|
11501
11503
|
const [hasCopied, setHasCopied] = useState29(false);
|
|
11502
11504
|
const copyToClipboard = () => {
|
|
@@ -11517,7 +11519,7 @@ var CodeContainer = (_a) => {
|
|
|
11517
11519
|
style,
|
|
11518
11520
|
className: "relative max-w-full overflow-x-scroll",
|
|
11519
11521
|
children: tokens.map((line, i) => /* @__PURE__ */ jsxs55("div", __spreadProps(__spreadValues({}, getLineProps({ line })), { children: [
|
|
11520
|
-
/* @__PURE__ */ jsx129("span", { className: "mr-6", children: i + 1 }),
|
|
11522
|
+
showNumbers && /* @__PURE__ */ jsx129("span", { className: "mr-6", children: i + 1 }),
|
|
11521
11523
|
line.map((token, key) => /* @__PURE__ */ jsx129(
|
|
11522
11524
|
"span",
|
|
11523
11525
|
__spreadValues({}, getTokenProps({ token })),
|
|
@@ -11529,8 +11531,8 @@ var CodeContainer = (_a) => {
|
|
|
11529
11531
|
/* @__PURE__ */ jsx129(
|
|
11530
11532
|
ButtonIcon,
|
|
11531
11533
|
{
|
|
11532
|
-
icon: hasCopied ? /* @__PURE__ */ jsx129(BiCheck2, { size:
|
|
11533
|
-
className: "top-2 right-2 absolute",
|
|
11534
|
+
icon: hasCopied ? /* @__PURE__ */ jsx129(BiCheck2, { size: 16 }) : /* @__PURE__ */ jsx129(BiClipboard, { size: 16 }),
|
|
11535
|
+
className: "top-2 right-2 absolute size-8",
|
|
11534
11536
|
color: hasCopied ? "success" : "primary",
|
|
11535
11537
|
onClick: copyToClipboard
|
|
11536
11538
|
}
|