aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Widgets/CVPreview/CVPreview.tsx
blob: e52a9b2b6f7abea5dc5369e72a9164ac1bd779c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { ExpandableWidget } from '@components/WidgetParts';
import { Trans } from '@lingui/macro';
import Image from 'next/image';
import Link from 'next/link';
import styles from './CVPreview.module.scss';

const CVPreview = ({
  title,
  imgSrc,
  pdf,
}: {
  title: string;
  imgSrc: string;
  pdf: string;
}) => {
  return (
    <ExpandableWidget title={title} expand={true}>
      <div className={styles.preview}>
        <Image
          src={imgSrc}
          layout="fill"
          objectFit="contain"
          objectPosition="left"
          alt="CV Armand Philippot"
        />
      </div>
      <p>
        <Trans>
          Download <Link href={pdf}>CV in PDF</Link>
        </Trans>
      </p>
    </ExpandableWidget>
  );
};

export default CVPreview;