56 lines
1.5 KiB
TypeScript
56 lines
1.5 KiB
TypeScript
import ContentLockup from "../ContentLockup";
|
|
import Button from "../Button";
|
|
import type { AskOrganizerViewProps } from "./AskOrganizer.types";
|
|
|
|
function AskOrganizerView({
|
|
title,
|
|
subtitle,
|
|
description,
|
|
buttonText,
|
|
buttonHref,
|
|
className,
|
|
sectionPadding,
|
|
contentGap,
|
|
buttonContainerClass,
|
|
variant,
|
|
labelledBy,
|
|
onContactClick,
|
|
}: AskOrganizerViewProps) {
|
|
return (
|
|
<section
|
|
className={`${sectionPadding} ${className}`}
|
|
aria-labelledby={labelledBy}
|
|
aria-label={labelledBy ? undefined : "Ask an organizer"}
|
|
tabIndex={-1}
|
|
>
|
|
<div className={`flex flex-col ${contentGap}`}>
|
|
{/* Content Lockup */}
|
|
<ContentLockup
|
|
title={title}
|
|
subtitle={subtitle}
|
|
description={description}
|
|
variant={variant === "inverse" ? "ask-inverse" : "ask"}
|
|
alignment={variant === "left-aligned" ? "left" : "center"}
|
|
titleId={labelledBy}
|
|
/>
|
|
|
|
{/* Button */}
|
|
<div className={buttonContainerClass}>
|
|
<Button
|
|
href={buttonHref}
|
|
size="large"
|
|
variant={variant === "inverse" ? "primary" : "default"}
|
|
className="xl:!px-[var(--spacing-scale-020)] xl:!py-[var(--spacing-scale-012)] xl:!text-[24px] xl:!leading-[28px]"
|
|
onClick={onContactClick}
|
|
ariaLabel={`${buttonText} - Contact an organizer for help`}
|
|
>
|
|
{buttonText}
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
);
|
|
}
|
|
|
|
export default AskOrganizerView;
|