This repository was archived by the owner on Apr 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathInfoRow.tsx
53 lines (51 loc) · 1.75 KB
/
InfoRow.tsx
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import Image from 'next/image'
import styles from './Products.module.scss'
import classNames from 'classnames'
import { Typography } from '../common/Typography/Typography'
import { PrimaryButton } from '../../components/common/Buttons/PrimaryButton'
import React from 'react'
import { ObfuscationSlider } from '../Home/ObfuscationSlider/ObfuscationSlider'
//Component for the image/text row for the footer of the product page
//invert puts the image on the right side of the text
const InfoRow = ({
title,
desc,
link,
linkText,
invert,
privacy,
imgSrc,
}: {
title: string
desc: string
link: string
linkText: string
invert?: boolean
privacy?: boolean
imgSrc?: any
}) => {
return (
<div className="flex flex-col lg:flex-row justify-center items-center gap-16 xl:gap-32">
<div className={`${invert ? 'lg:hidden ' : ''} flex justify-center lg:w-[570px] w-full h-full`}>
{privacy ? <ObfuscationSlider /> : <Image src={imgSrc} alt="" />}
</div>
<div className="lg:w-1/2 text-center lg:text-left">
<h3 className={styles.infoTitle}>{title}</h3>
<Typography type="copy2" onDark>
<p className="text-color-copy-on-dark md:text-xl">{desc}</p>
</Typography>
<div className="flex justify-center lg:justify-start">
<PrimaryButton href={link} className={classNames(styles.hollowButton, styles.docsButton, 'mt-5')}>
<Typography type="copy2" emphasis={true}>
{linkText}
</Typography>
</PrimaryButton>
</div>
</div>
<div className={`${invert ? 'lg:flex' : ''} hidden justify-center lg:w-[570px]`}>
{privacy ? <ObfuscationSlider /> : <Image src={imgSrc} alt="" />}
</div>
</div>
)
}
export default InfoRow