2021-02-04 06:42:15 +01:00
|
|
|
import { IFigureImage } from '../../../types/cms';
|
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 09:50:18 +02:00
|
|
|
<div className="relative w-full max-h-full mb-4 md:max-h-screen">
|
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 09:50:18 +02:00
|
|
|
<div className="w-8/12 pl-2 text-sm italic">
|
|
|
|
{featureImage?.description}
|
|
|
|
</div>
|
2021-02-02 06:28:00 +01:00
|
|
|
)}
|
2021-01-22 03:43:42 +01:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|