From 088a3524f5b21a5043ddcd30d8c068cac6b451c7 Mon Sep 17 00:00:00 2001 From: devvsakib Date: Tue, 30 Jul 2024 22:28:45 +0600 Subject: [PATCH] new font + new component for resource card --- src/components/Layout/Layout.jsx | 2 +- src/components/Resources/ResourceCard.jsx | 27 ++++++++++++++++++++ src/components/Resources/ResourceSection.jsx | 17 ++++-------- 3 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 src/components/Resources/ResourceCard.jsx diff --git a/src/components/Layout/Layout.jsx b/src/components/Layout/Layout.jsx index 5b817ee..8350afa 100644 --- a/src/components/Layout/Layout.jsx +++ b/src/components/Layout/Layout.jsx @@ -10,7 +10,7 @@ import { ThemeProvider } from '../../context/ThemeContext'; */ const Layout = ({ stars, children }) => { return ( -
+
{ + return
+ {resource.image && ( + {resource.title} + )} +
+

{resource.title}

+

{resource.description}

+ + Learn More + +
+
; +}; + +export default ResourceCard; diff --git a/src/components/Resources/ResourceSection.jsx b/src/components/Resources/ResourceSection.jsx index 11df0e6..6d18c56 100644 --- a/src/components/Resources/ResourceSection.jsx +++ b/src/components/Resources/ResourceSection.jsx @@ -1,18 +1,11 @@ -import { Link } from "react-router-dom"; +import ResourceCard from "./ResourceCard"; const ResourceSection = ({ title, resources }) => ( -
-

{title}

-
+
+

{title}

+
{resources.map((resource, index) => ( -
- {resource.image && {resource.title}} -

{resource.title}

-

{resource.description}

- - Learn More - -
+ ))}