@particle-academy/react-fancy 4.4.6 → 4.4.7
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.cjs +16 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2569,7 +2569,22 @@ var Button = react.forwardRef(
|
|
|
2569
2569
|
trailingElements
|
|
2570
2570
|
] });
|
|
2571
2571
|
const safeHref = sanitizeHref(href);
|
|
2572
|
-
const buttonEl = safeHref && !disabled ?
|
|
2572
|
+
const buttonEl = safeHref && !disabled ? (
|
|
2573
|
+
// Anchor mode forwards the same rest props as the <button> branch so
|
|
2574
|
+
// onClick / target / rel / ref / ARIA / data-* reach the <a> (issue #7).
|
|
2575
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2576
|
+
"a",
|
|
2577
|
+
{
|
|
2578
|
+
ref,
|
|
2579
|
+
href: safeHref,
|
|
2580
|
+
className: classes,
|
|
2581
|
+
"data-react-fancy-button": "",
|
|
2582
|
+
"data-react-fancy-action": "",
|
|
2583
|
+
...props,
|
|
2584
|
+
children: content
|
|
2585
|
+
}
|
|
2586
|
+
)
|
|
2587
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2573
2588
|
"button",
|
|
2574
2589
|
{
|
|
2575
2590
|
ref,
|