@bettercms-ai/ui 0.15.1 → 0.16.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/{Video-D6jrdR2Z.d.ts → Video-vB2IlrdH.d.ts} +1 -1
- package/dist/blocks.d.ts +1 -1
- package/dist/blocks.js +8 -0
- package/dist/blocks.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/registry.js +8 -0
- package/dist/registry.js.map +1 -1
- package/dist/renderer.js +8 -0
- package/dist/renderer.js.map +1 -1
- package/dist/resolve.d.ts +4 -2
- package/dist/resolve.js +27 -3
- package/dist/resolve.js.map +1 -1
- package/package.json +2 -2
package/dist/registry.js
CHANGED
|
@@ -589,6 +589,7 @@ function Button({
|
|
|
589
589
|
icon: iconProp,
|
|
590
590
|
newTab = false,
|
|
591
591
|
rel,
|
|
592
|
+
action,
|
|
592
593
|
align = "left",
|
|
593
594
|
className = "",
|
|
594
595
|
style,
|
|
@@ -620,6 +621,13 @@ function Button({
|
|
|
620
621
|
const sizeClass = size === "sm" || size === "lg" ? sizeStyles[size] : sizeStyles.md;
|
|
621
622
|
const fullClass = fullWidth === true ? "flex w-full justify-center" : "";
|
|
622
623
|
const relTokens = [...newTab === true ? ["noopener", "noreferrer"] : [], ...LINK_RELS.includes(rel) ? [rel] : []];
|
|
624
|
+
if (action === "code") {
|
|
625
|
+
return /* @__PURE__ */ jsxs3("button", { type: "button", "data-bcms-field": field, "data-bcms-kind": kind, style, className: cn(baseStyles, variantStyles[buttonVariantOf(variant)], alignClass, sizeClass, fullClass, className), children: [
|
|
626
|
+
icon && /* @__PURE__ */ jsx5("span", { className: "mr-2 inline-flex", dangerouslySetInnerHTML: { __html: buttonIconSvg(icon, "bcms-btn-icon") } }),
|
|
627
|
+
text,
|
|
628
|
+
arrow === true && /* @__PURE__ */ jsx5("span", { className: "ml-2 inline-flex", dangerouslySetInnerHTML: { __html: buttonIconSvg("arrow-right", "bcms-btn-arrow") } })
|
|
629
|
+
] });
|
|
630
|
+
}
|
|
623
631
|
return /* @__PURE__ */ jsxs3(
|
|
624
632
|
"a",
|
|
625
633
|
{
|