Files
community-rule/app/components/sections/AskOrganizer/AskOrganizer.view.tsx
T
adilalloandCursor 33cdaf135c Match Home, top nav, hero, and logo wall to the current marketing frames.
Puts Workshops in the header, pairs the hero with a static rule card and breakpoint CTAs, and shows the three pilot marks with no wall label.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-02 18:50:32 -07:00

71 lines
2.0 KiB
TypeScript

"use client";
import ContentLockup from "../../type/ContentLockup";
import Button from "../../buttons/Button";
import type { AskOrganizerViewProps } from "./AskOrganizer.types";
function AskOrganizerView({
title,
subtitle,
description,
buttonText,
ctaAriaLabel,
className,
sectionPadding,
contentGap,
buttonContainerClass,
variant,
labelledBy,
onContactClick,
}: AskOrganizerViewProps) {
const isUseCaseDetail = variant === "use-case-detail";
const lockupVariant =
variant === "inverse" || isUseCaseDetail ? "ask-inverse" : "ask";
const lockupAlignment =
variant === "left-aligned" ? "left" : "center";
const buttonPalette =
variant === "inverse" || isUseCaseDetail ? "inverse" : "default";
return (
<section
className={`${sectionPadding} ${className}`}
aria-labelledby={labelledBy}
aria-label={labelledBy ? undefined : ctaAriaLabel}
tabIndex={-1}
data-figma-node={isUseCaseDetail ? "22015-42624" : "18116-15960"}
>
<div
className={`mx-auto flex w-full min-w-0 max-w-[1280px] flex-col md:min-w-[358px] ${contentGap} ${isUseCaseDetail ? "items-center" : ""}`}
>
<ContentLockup
title={title}
subtitle={subtitle}
description={description}
variant={lockupVariant}
alignment={lockupAlignment}
titleId={labelledBy}
headingLevel="h2"
/>
<div
className={`${buttonContainerClass} flex-wrap gap-y-[var(--space-400)]`}
>
<Button
size="small"
buttonType="filled"
palette={buttonPalette}
className="!px-[var(--space-250)] md:!px-[var(--space-400)] md:!py-[var(--space-300)] md:!text-medium-label"
onClick={onContactClick}
ariaLabel={ctaAriaLabel}
data-testid="ask-organizer-cta"
>
{buttonText}
</Button>
</div>
</div>
</section>
);
}
export default AskOrganizerView;