From 1980709f05169cccda660decfb3ae41863d5574e Mon Sep 17 00:00:00 2001 From: Mitch Chanza Date: Thu, 19 Sep 2024 06:26:47 +0200 Subject: [PATCH] update CardsHolder.tsx and QuizCards.tsx --- .../src/components/QuizCards/CardsHolder.tsx | 2 +- .../src/components/QuizCards/QuizCards.tsx | 87 ++++++++++++------- 2 files changed, 56 insertions(+), 33 deletions(-) diff --git a/components/src/components/QuizCards/CardsHolder.tsx b/components/src/components/QuizCards/CardsHolder.tsx index 3411f8a..4ca93b6 100644 --- a/components/src/components/QuizCards/CardsHolder.tsx +++ b/components/src/components/QuizCards/CardsHolder.tsx @@ -15,7 +15,7 @@ export const CardsHolder = ({ children }: { children: React.ReactNode }) => { justifyContent: 'center' }} > -
+
{children}
diff --git a/components/src/components/QuizCards/QuizCards.tsx b/components/src/components/QuizCards/QuizCards.tsx index 4ad88fd..6bc67a3 100644 --- a/components/src/components/QuizCards/QuizCards.tsx +++ b/components/src/components/QuizCards/QuizCards.tsx @@ -19,40 +19,63 @@ interface TestingCOProps { export const QuizCards: React.FC = ({ files,url }) => { return ( -
-
+
+
{files.map((file) => ( -
- -
- -
-
-
- {file.title.split(" ").map((word, index) => ( -

- {word} -

- ))} -
-
- +
+ + {/* Mobile View */} +
+
+
+ {file.title.split(" ").map((word, index) => ( +

+ {word} +

+ ))}
+
+
+ {/* Desktop View */} +
+ +
+
+
+ {file.title.split(" ").map((word, index) => ( +

+ {word} +

+ ))} +
+
+ {file.title.split(" ").map((word, index) => ( +

+ {word} +

+ ))} +
+
+ +
))}