2021-02-04 06:42:15 +01:00
|
|
|
import { IFigureImage } from '../../../types/cms';
|
2021-06-29 10:35:37 +02:00
|
|
|
import { Contained } from '../../Contained';
|
|
|
|
import { ArticleContained } from '../../ArticleContained';
|
2021-01-22 03:43:42 +01:00
|
|
|
|
|
|
|
interface Props {
|
|
|
|
featureImage: IFigureImage;
|
2021-05-07 07:17:41 +02:00
|
|
|
title: string;
|
2021-01-22 03:43:42 +01:00
|
|
|
}
|
|
|
|
|
2021-05-07 07:17:41 +02:00
|
|
|
export function ArticleSectionFeatureImage({ featureImage, title }: Props) {
|
2021-01-22 03:43:42 +01:00
|
|
|
return (
|
2021-02-04 06:42:15 +01:00
|
|
|
<div className="w-full pb-4 desktop:pb-0">
|
2021-06-29 10:42:45 +02:00
|
|
|
<div className="relative flex items-center justify-center w-full h-full">
|
2021-02-18 04:28:52 +01:00
|
|
|
<img
|
|
|
|
src={featureImage?.imageUrl}
|
2021-05-07 07:17:41 +02:00
|
|
|
alt={featureImage?.description ?? title}
|
2021-06-29 09:50:18 +02:00
|
|
|
className="object-fill"
|
2021-02-18 04:28:52 +01:00
|
|
|
/>
|
2021-01-22 03:43:42 +01:00
|
|
|
</div>
|
|
|
|
|
2021-02-02 06:28:00 +01:00
|
|
|
{featureImage?.description && (
|
2021-06-29 10:35:37 +02:00
|
|
|
<Contained>
|
|
|
|
<ArticleContained>
|
|
|
|
<div className="pt-2 italic ext-sm">
|
|
|
|
{featureImage?.description}
|
|
|
|
</div>
|
|
|
|
</ArticleContained>
|
|
|
|
</Contained>
|
2021-02-02 06:28:00 +01:00
|
|
|
)}
|
2021-01-22 03:43:42 +01:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|