Files
community-rule/app/components/sections/AskOrganizer/AskOrganizer.view.tsx
T
adilallo d9c475a967 Give finished Rules a print path, folded launch counts, and a two-day follow-up.
Export is PDF, RULE.md, and Print on US Letter, with every shared term, no member names, and a takeaway that points at Ask an organizer. Finished Rules keep type and place so the team can read folded counts without a database, Umami can sit beside the app with no cookies, and the person who holds the pen gets working PDF and RULE.md links 48 hours later.
2026-11-10 18:32:33 -07:00

73 lines
2.1 KiB
TypeScript

"use client";
import ContentLockup from "../../type/ContentLockup";
import Button from "../../buttons/Button";
import { ASK_ORGANIZER_HASH } from "../../../../lib/sharePaths";
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
id={ASK_ORGANIZER_HASH}
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;