2022-02-10 23:45:17 +01:00
|
|
|
import { Icon, Icons } from "components/Icon";
|
2022-02-25 21:23:16 +01:00
|
|
|
import { ArrowLink } from "components/text/ArrowLink";
|
2022-02-10 23:45:17 +01:00
|
|
|
import { ReactNode } from "react";
|
|
|
|
|
|
|
|
interface SectionHeadingProps {
|
|
|
|
icon?: Icons;
|
|
|
|
title: string;
|
|
|
|
children?: ReactNode;
|
2022-02-18 20:22:56 +01:00
|
|
|
linkText?: string;
|
|
|
|
onClick?: () => void;
|
2022-02-10 23:45:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export function SectionHeading(props: SectionHeadingProps) {
|
|
|
|
return (
|
|
|
|
<div className="mt-12">
|
2022-02-18 20:22:56 +01:00
|
|
|
<div className="mb-4 flex items-end">
|
|
|
|
<p className="text-denim-700 flex flex-1 items-center font-bold uppercase">
|
|
|
|
{props.icon ? (
|
|
|
|
<span className="mr-2 text-xl">
|
|
|
|
<Icon icon={props.icon} />
|
|
|
|
</span>
|
|
|
|
) : null}
|
|
|
|
{props.title}
|
|
|
|
</p>
|
|
|
|
{props.linkText ? (
|
2022-02-25 21:20:35 +01:00
|
|
|
<ArrowLink
|
2022-02-18 20:22:56 +01:00
|
|
|
linkText={props.linkText}
|
|
|
|
direction="left"
|
|
|
|
onClick={props.onClick}
|
|
|
|
/>
|
2022-02-10 23:45:17 +01:00
|
|
|
) : null}
|
2022-02-18 20:22:56 +01:00
|
|
|
</div>
|
2022-02-10 23:45:17 +01:00
|
|
|
{props.children}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|