@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/renderer.js CHANGED
@@ -592,6 +592,7 @@ function Button({
592
592
  icon: iconProp,
593
593
  newTab = false,
594
594
  rel,
595
+ action,
595
596
  align = "left",
596
597
  className = "",
597
598
  style,
@@ -623,6 +624,13 @@ function Button({
623
624
  const sizeClass = size === "sm" || size === "lg" ? sizeStyles[size] : sizeStyles.md;
624
625
  const fullClass = fullWidth === true ? "flex w-full justify-center" : "";
625
626
  const relTokens = [...newTab === true ? ["noopener", "noreferrer"] : [], ...LINK_RELS.includes(rel) ? [rel] : []];
627
+ if (action === "code") {
628
+ 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: [
629
+ icon && /* @__PURE__ */ jsx5("span", { className: "mr-2 inline-flex", dangerouslySetInnerHTML: { __html: buttonIconSvg(icon, "bcms-btn-icon") } }),
630
+ text,
631
+ arrow === true && /* @__PURE__ */ jsx5("span", { className: "ml-2 inline-flex", dangerouslySetInnerHTML: { __html: buttonIconSvg("arrow-right", "bcms-btn-arrow") } })
632
+ ] });
633
+ }
626
634
  return /* @__PURE__ */ jsxs3(
627
635
  "a",
628
636
  {