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;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function ArticleSectionFeatureImage({ featureImage }: Props) {
|
|
|
|
return (
|
2021-02-04 06:42:15 +01:00
|
|
|
<div className="w-full pb-4 desktop:pb-0">
|
2021-01-22 03:43:42 +01:00
|
|
|
<div
|
|
|
|
style={{ paddingBottom: '40%' }}
|
2021-02-12 01:06:54 +01:00
|
|
|
className="relative w-full h-0 mb-4 overflow-hidden bg-gray-300"
|
2021-01-22 03:43:42 +01:00
|
|
|
>
|
|
|
|
<div className="absolute inset-0">
|
|
|
|
<img
|
2021-02-11 06:26:56 +01:00
|
|
|
src={featureImage?.imageUrl}
|
2021-02-12 01:06:54 +01:00
|
|
|
alt={featureImage?.description ?? ''}
|
2021-01-22 03:43:42 +01:00
|
|
|
style={{ objectFit: 'cover' }}
|
|
|
|
className="w-full h-full"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-02-02 06:28:00 +01:00
|
|
|
{featureImage?.description && (
|
2021-02-12 01:06:54 +01:00
|
|
|
<div className="w-8/12 text-sm italic">{featureImage?.description}</div>
|
2021-02-02 06:28:00 +01:00
|
|
|
)}
|
2021-01-22 03:43:42 +01:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|