ServicesContent.js
1.2 KB
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
import React from "react";
import { Col, Row } from "react-bootstrap";
import Image from "next/image";
import { motion } from "framer-motion";
import Heading from "@/components/reuseables/Heading";
const ContentSection = ({
subtitle,
title,
paragraphs,
imageSrc,
imageAlt,
reverse,
animation,
}) => {
return (
<Row
className="align-items-center mb-5 mb-lg-5 mb-xl-5 gx-5"
style={{
flexDirection: reverse ? "row-reverse" : "row",
}}
>
<Col lg={6} md={12}>
<motion.div
variants={animation}
initial={"hidden"}
whileInView={"show"}
viewport={{ once: false, amount: 0.4 }}
>
<Image
src={imageSrc}
alt={imageAlt}
layout="fill"
className="img-fluid image"
/>
</motion.div>
</Col>
<Col lg={6} md={12}>
<div className="call-back-request-text">
<span className="sub-title">{subtitle}</span>
<Heading el="h2" heading={title} />
{paragraphs.map((paragraph, index) => (
<p key={index}>{paragraph}</p>
))}
</div>
</Col>
</Row>
);
};
export default ContentSection;