diff --git a/pages/index.tsx b/pages/index.tsx
index 5717122..b622bc6 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -5,6 +5,7 @@ import SectionProviders from '~/src/components/SectionProviders'
import SectionApps from '~/src/components/SectionApps'
import Articles from '~/src/components/Articles'
import Footer from '~/src/components/Footer'
+import Depoiments from '~/src/components/Depoiments'
const Home = () => {
return (
@@ -14,6 +15,7 @@ const Home = () => {
+
diff --git a/src/components/Depoiments/Arrows/index.tsx b/src/components/Depoiments/Arrows/index.tsx
new file mode 100644
index 0000000..d2480f4
--- /dev/null
+++ b/src/components/Depoiments/Arrows/index.tsx
@@ -0,0 +1,42 @@
+import { useContext } from 'react'
+import { DepoimentsContext } from '../context'
+
+import { ArrowBack, ArrowForward } from '@mui/icons-material'
+import { DEPOIMENTS } from '../Depoiments.data'
+
+const Arrows = () => {
+ const { goToStep, nextStep, prevStep, step, firstStep, lastStep } =
+ useContext(DepoimentsContext)
+
+ return (
+
+
prevStep()}
+ />
+
+ {DEPOIMENTS.map(({ id }) => {
+ return (
+
goToStep(id)}
+ key={id}
+ />
+ )
+ })}
+
+
nextStep()}
+ />
+
+ )
+}
+
+export default Arrows
diff --git a/src/components/Depoiments/Cards/index.tsx b/src/components/Depoiments/Cards/index.tsx
new file mode 100644
index 0000000..34da22f
--- /dev/null
+++ b/src/components/Depoiments/Cards/index.tsx
@@ -0,0 +1,51 @@
+/* eslint-disable @next/next/no-img-element */
+import { useContext } from 'react'
+import { DepoimentsContext } from '../context'
+import Title from '../../Title'
+import { DEPOIMENTS } from '../Depoiments.data'
+
+const Card = () => {
+ const { step } = useContext(DepoimentsContext)
+ const { image, name, jobRole, depoiment } = DEPOIMENTS[step]
+
+ return (
+
+
+
+ What our customer are saying
+
+
+
+
+
+
+
"{depoiment}"
+
+
+
+ )
+}
+
+export default Card
diff --git a/src/components/Depoiments/Depoiments.data.ts b/src/components/Depoiments/Depoiments.data.ts
new file mode 100644
index 0000000..3206cb7
--- /dev/null
+++ b/src/components/Depoiments/Depoiments.data.ts
@@ -0,0 +1,43 @@
+export const DEPOIMENTS = [
+ {
+ image:
+ 'https://media.discordapp.net/attachments/778024116140769331/1151694177978023976/image_1.png',
+ name: 'Edward Newgate',
+ jobRole: 'Founder Circle',
+ depoiment:
+ 'Our dedicated patient engagement app and web portal allow you to access information instantaneously (no tedeous form, long calls, or administrative hassle) and securely',
+ id: 0,
+ },
+ {
+ image:
+ 'https://media.discordapp.net/attachments/778024116140769331/1151700614275936326/presidente.png?width=671&height=671',
+ name: 'Gabriel Duete',
+ jobRole: 'Presidente da república',
+ depoiment: 'Eu como presidente, Digo: Esse site é bala demais!',
+ id: 1,
+ },
+ {
+ image:
+ 'https://media.discordapp.net/attachments/778024116140769331/1151700802914746428/natalino.jpg',
+ name: 'Gabriel Duete Natalino',
+ jobRole: 'Cosplayer de papai noel',
+ depoiment: 'Ho Ho Ho',
+ id: 2,
+ },
+ {
+ image:
+ 'https://media.discordapp.net/attachments/778024116140769331/1151700151149277235/oscar.png?width=684&height=671',
+ name: 'Gabriel Duete',
+ jobRole: 'Melhor ator',
+ depoiment: 'Como um bom ator, declaro que esse serviço é bom mesmo!',
+ id: 3,
+ },
+ {
+ image:
+ 'https://media.discordapp.net/attachments/778024116140769331/1151701062760267856/awards.png?width=684&height=671',
+ name: 'Gabriel Duete',
+ jobRole: 'Gamer do ano',
+ depoiment: 'Jogar vídeo game é massa!',
+ id: 4,
+ },
+]
diff --git a/src/components/Depoiments/Depoiments.spec.tsx b/src/components/Depoiments/Depoiments.spec.tsx
new file mode 100644
index 0000000..95d9f4c
--- /dev/null
+++ b/src/components/Depoiments/Depoiments.spec.tsx
@@ -0,0 +1,20 @@
+import { render, screen } from '@testing-library/react'
+
+import Depoiments from '.'
+import { DepoimentsStorage } from './context'
+
+describe('', () => {
+ beforeEach(() => {
+ render(
+
+
+
+ )
+ })
+
+ it('should render title correctly', () => {
+ screen.getByText('What our customer are saying')
+ })
+
+ it.todo('test slide')
+})
diff --git a/src/components/Depoiments/context.tsx b/src/components/Depoiments/context.tsx
new file mode 100644
index 0000000..32392c9
--- /dev/null
+++ b/src/components/Depoiments/context.tsx
@@ -0,0 +1,66 @@
+/* eslint-disable @typescript-eslint/no-unused-vars */
+/* eslint-disable @typescript-eslint/no-empty-function */
+import {
+ createContext,
+ useState,
+ ReactNode,
+ Dispatch,
+ SetStateAction,
+} from 'react'
+
+import { DEPOIMENTS } from './Depoiments.data'
+
+type DepoimentsParams = {
+ step: number
+ setStep: Dispatch>
+ prevStep: () => void
+ nextStep: () => void
+ goToStep: (index: number) => void
+ firstStep: boolean
+ lastStep: boolean
+}
+
+export const DepoimentsContext = createContext({
+ step: 0,
+ setStep: () => {},
+ prevStep: () => {},
+ nextStep: () => {},
+ goToStep: (index: number) => {},
+ firstStep: true,
+ lastStep: false,
+})
+
+export const DepoimentsStorage = ({ children }: { children: ReactNode }) => {
+ const [step, setStep] = useState(0)
+
+ const firstStep = step === 0
+ const lastStep = step + 1 > DEPOIMENTS.length - 1
+
+ const prevStep = () => {
+ !firstStep && setStep(step - 1)
+ }
+
+ const nextStep = () => {
+ !lastStep && setStep(step + 1)
+ }
+
+ const goToStep = (index: number) => {
+ setStep(index)
+ }
+
+ return (
+
+ {children}
+
+ )
+}
diff --git a/src/components/Depoiments/index.tsx b/src/components/Depoiments/index.tsx
new file mode 100644
index 0000000..f791a5b
--- /dev/null
+++ b/src/components/Depoiments/index.tsx
@@ -0,0 +1,17 @@
+import Arrows from './Arrows'
+import Cards from './Cards'
+
+import { DepoimentsStorage } from './context'
+
+const Depoiments = () => {
+ return (
+
+
+
+ )
+}
+
+export default Depoiments
diff --git a/src/components/Footer/Item/index.tsx b/src/components/Footer/Item/index.tsx
index 1312132..d144ccc 100644
--- a/src/components/Footer/Item/index.tsx
+++ b/src/components/Footer/Item/index.tsx
@@ -8,7 +8,7 @@ type ItemProps = {
const Item = ({ title, items }: ItemProps) => {
return (
-
{title}
+
{title}
{items.map(text => {
return (
diff --git a/src/components/SectionServices/Cards/Cards.tsx b/src/components/SectionServices/Cards/Cards.tsx
index 624c1aa..1313cc5 100644
--- a/src/components/SectionServices/Cards/Cards.tsx
+++ b/src/components/SectionServices/Cards/Cards.tsx
@@ -23,7 +23,9 @@ const Cards = () => {
/>
{title}
-
{subtitle}
+
+ {subtitle}
+
)
})}
diff --git a/src/components/Title/index.tsx b/src/components/Title/index.tsx
index c29778d..8e7daa6 100644
--- a/src/components/Title/index.tsx
+++ b/src/components/Title/index.tsx
@@ -1,29 +1,38 @@
import React from 'react'
type TitleProps = {
- children: string | React.ReactElement
fontSize?: string
+ color?: 'black' | 'white'
width?: string
hasLine?: boolean
linePositionCenter?: boolean
+ children: string | React.ReactElement
}
const Title = ({
- children,
fontSize,
+ color = 'black',
width,
hasLine,
linePositionCenter,
+ children,
}: TitleProps) => {
+ const isBlack = color === 'black'
+
return (
-
+
{children}
{hasLine && (
)}