@particle-academy/react-fancy 4.10.0 → 4.11.0
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 +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2421,6 +2421,7 @@ var Button = react.forwardRef(
|
|
|
2421
2421
|
loading = false,
|
|
2422
2422
|
disabled,
|
|
2423
2423
|
href,
|
|
2424
|
+
as: As,
|
|
2424
2425
|
responsive,
|
|
2425
2426
|
labelClassName,
|
|
2426
2427
|
...props
|
|
@@ -2583,11 +2584,12 @@ var Button = react.forwardRef(
|
|
|
2583
2584
|
trailingElements
|
|
2584
2585
|
] });
|
|
2585
2586
|
const safeHref = sanitizeHref(href);
|
|
2587
|
+
const Anchor = As ?? "a";
|
|
2586
2588
|
const buttonEl = safeHref && !disabled ? (
|
|
2587
2589
|
// Anchor mode forwards the same rest props as the <button> branch so
|
|
2588
2590
|
// onClick / target / rel / ref / ARIA / data-* reach the <a> (issue #7).
|
|
2589
2591
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2590
|
-
|
|
2592
|
+
Anchor,
|
|
2591
2593
|
{
|
|
2592
2594
|
ref,
|
|
2593
2595
|
href: safeHref,
|