From 4782bac4e8787abd19397d88bd77a322db7d285d Mon Sep 17 00:00:00 2001 From: Ben Life Date: Tue, 26 May 2026 14:52:56 -0400 Subject: [PATCH 1/6] add comprehensive cta --- .../src/components/atoms/cta.tsx | 10 +- .../contentBlocks/ComprehensiveCTA.tsx | 327 ++++++++++++++++++ .../src/components/contentBlocks/index.ts | 4 + .../src/fields/fieldOverrides.ts | 2 + packages/visual-editor/src/fields/fields.ts | 2 + .../ComprehensiveCTAField.test.tsx | 327 ++++++++++++++++++ .../styledFields/ComprehensiveCTAField.tsx | 301 ++++++++++++++++ .../src/fields/styledFields/index.ts | 6 + 8 files changed, 978 insertions(+), 1 deletion(-) create mode 100644 packages/visual-editor/src/components/contentBlocks/ComprehensiveCTA.tsx create mode 100644 packages/visual-editor/src/fields/styledFields/ComprehensiveCTAField.test.tsx create mode 100644 packages/visual-editor/src/fields/styledFields/ComprehensiveCTAField.tsx diff --git a/packages/visual-editor/src/components/atoms/cta.tsx b/packages/visual-editor/src/components/atoms/cta.tsx index 2b26d3026..0f054a04f 100644 --- a/packages/visual-editor/src/components/atoms/cta.tsx +++ b/packages/visual-editor/src/components/atoms/cta.tsx @@ -43,6 +43,7 @@ export type CTAProps = { // Styling and behavior props variant?: ButtonProps["variant"]; className?: string; + style?: React.CSSProperties; eventName?: string; target?: "_self" | "_blank" | "_parent" | "_top"; alwaysHideCaret?: boolean; @@ -237,6 +238,7 @@ export const CTA = (props: CTAProps) => { eventName, target, variant, + style, ctaType, onClick, disabled = false, @@ -381,6 +383,7 @@ export const CTA = (props: CTAProps) => { textTransform: buttonVariant?.toLowerCase().includes("link") ? LINK_TEXT_TRANSFORM_CSS_VAR : BUTTON_TEXT_TRANSFORM_CSS_VAR, + ...style, }} > {linkContent} @@ -409,6 +412,7 @@ export const CTA = (props: CTAProps) => { textTransform: buttonVariant?.toLowerCase().includes("link") ? LINK_TEXT_TRANSFORM_CSS_VAR : BUTTON_TEXT_TRANSFORM_CSS_VAR, + ...style, }} className={buttonClassName} variant={buttonVariant} @@ -424,7 +428,10 @@ export const CTA = (props: CTAProps) => { return (