diff --git a/src/data/index.ts b/src/data/index.ts
new file mode 100644
index 0000000..85eae14
--- /dev/null
+++ b/src/data/index.ts
@@ -0,0 +1,82 @@
+export const dataSource = [
+ {
+ productMeta: {
+ title: 'Maserati Aventador',
+ desc: 'Id repellendus tempore facere eos unde praesentium hic aspernatur dolores.',
+ imageUrl:
+ 'https://images.pexels.com/photos/1148955/pexels-photo-1148955.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',
+ price: '340.28',
+ },
+ id: 'e3b2ebd',
+ },
+ {
+ productMeta: {
+ title: 'Dodge Expedition',
+ desc: 'Et et laborum eveniet nam voluptatum consequatur architecto.',
+ imageUrl:
+ 'https://images.pexels.com/photos/1148955/pexels-photo-1148955.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',
+ price: '202.18',
+ },
+ id: '23f99f0',
+ },
+ {
+ productMeta: {
+ title: 'Hyundai Accord',
+ desc: 'Ut iure repellat illo.',
+ imageUrl:
+ 'https://images.pexels.com/photos/1148955/pexels-photo-1148955.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',
+ price: '863.65',
+ },
+ id: '1afd20e',
+ },
+ {
+ productMeta: {
+ title: 'Dodge Challenger',
+ desc: 'Inventore reprehenderit animi suscipit explicabo maxime omnis perspiciatis ut.',
+ imageUrl:
+ 'https://images.pexels.com/photos/1148955/pexels-photo-1148955.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',
+ price: '512.95',
+ },
+ id: 'de3b830',
+ },
+ {
+ productMeta: {
+ title: 'Volvo Fiesta',
+ desc: 'Optio quae labore sint.',
+ imageUrl:
+ 'https://images.pexels.com/photos/1148955/pexels-photo-1148955.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',
+ price: '874.02',
+ },
+ id: '23b7226',
+ },
+ {
+ productMeta: {
+ title: 'Cadillac Challenger',
+ desc: 'Nihil vel praesentium reiciendis praesentium quo.',
+ imageUrl:
+ 'https://images.pexels.com/photos/1148955/pexels-photo-1148955.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',
+ price: '611.85',
+ },
+ id: 'efbeaab',
+ },
+ {
+ productMeta: {
+ title: 'Toyota Mustang',
+ desc: 'Aliquam quo et earum commodi porro commodi dolores voluptatem recusandae.',
+ imageUrl:
+ 'https://images.pexels.com/photos/1148955/pexels-photo-1148955.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',
+ price: '779.00',
+ },
+ id: '629e50f',
+ },
+ {
+ productMeta: {
+ title: 'Porsche Roadster',
+ desc: 'Perspiciatis dolores dolorum unde aut ullam eveniet repellendus.',
+ imageUrl:
+ 'https://images.pexels.com/photos/1148955/pexels-photo-1148955.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',
+ price: '486.57',
+ },
+ id: '4c0af1e',
+ },
+];
diff --git a/src/scenes/Dashboard/fragments/Banner.tsx b/src/scenes/Dashboard/fragments/Banner.tsx
new file mode 100644
index 0000000..abe0ed4
--- /dev/null
+++ b/src/scenes/Dashboard/fragments/Banner.tsx
@@ -0,0 +1,86 @@
+import React from 'react';
+import { Box, Button, Typography, useTheme } from '@mui/material';
+
+import '../dashboard.styles.css';
+
+const Banner = () => {
+ const theme = useTheme();
+ const classes = {
+ bannerContainer: {
+ height: '1007.93px',
+ background: "url('/assets/heroImage.png')",
+ backgroundRepeat: 'no-repeat',
+ backgroundSize: 'cover',
+ backgroundPosition: 'center',
+ opacity: '0.85',
+ position: 'relative',
+ zIndex: 1,
+ },
+ bannerAdv: {
+ letterSpacing: '3px',
+ fontWeight: '600',
+ fontSize: '16px',
+ '&.MuiTypography-subtitle1': {},
+ },
+ bannerTitle: {
+ color: '#B88E2F',
+ fontSize: '52px',
+ fontStyle: 'normal',
+ fontWeight: '700',
+ lineHeight: '65px',
+ '&.MuiTypography-h6': {},
+ },
+ bannerDesc: {
+ width: '546px',
+ fontSize: '18px',
+ fontWeight: '500',
+ lineHeight: '24px',
+ letterSpacing: '1.2px',
+ m: '1rem 0',
+ '&.MuiTypography-body1': {},
+ },
+ button: {
+ backgroundColor: theme.palette.secondary.main,
+ color: theme.palette.primary.main,
+ p: '1.7rem 4rem',
+ width: '190px',
+ height: '24px',
+ textAlign: 'center',
+ borderRadius: 'none',
+ '&:hover': {
+ backgroundColor: theme.palette.secondary[400],
+ color: theme.palette.primary.main,
+ },
+ },
+ };
+ return (
+
+
+
+
+ New Arrival
+
+
+ Discover Our New Collection
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec
+ ullamcorper mattis.
+
+
+
+
+
+
+ );
+};
+
+export default Banner;
diff --git a/src/scenes/Dashboard/fragments/FeaturedProducts.tsx b/src/scenes/Dashboard/fragments/FeaturedProducts.tsx
new file mode 100644
index 0000000..cf807c7
--- /dev/null
+++ b/src/scenes/Dashboard/fragments/FeaturedProducts.tsx
@@ -0,0 +1,126 @@
+import {
+ Box,
+ Card,
+ CardMedia,
+ CardContent,
+ Typography,
+ CardActions,
+ Button,
+ Container,
+ useTheme,
+ Hidden,
+ Fade,
+ Backdrop,
+} from '@mui/material';
+import { dataSource } from '../../../data';
+import { useState } from 'react';
+
+const FeaturedProducts = () => {
+ const theme = useTheme();
+ const [hoveredCard, setHoveredCard] = useState(null);
+
+ const handleCardHover = (cardId: string) => {
+ setHoveredCard(cardId);
+ };
+
+ const handleCardLeave = () => {
+ setHoveredCard(null);
+ };
+
+ const classes = {
+ card: {
+ maxWidth: '285px',
+ maxHeight: '446px',
+ gap: '1rem',
+ m: '1rem 0.5rem',
+ borderRadius: 'none',
+ },
+ cardMedia: {
+ width: '285px',
+ height: '301px',
+ flexShrink: '0',
+ },
+ cardContent: {
+ width: '285px',
+ height: '145px',
+ flexShrink: '0',
+ backgroundColor: 'var(--color-light-bg, #F4F5F7)',
+ },
+ title: {
+ fontSize: '40px',
+ fontStyle: 'normal',
+ fontWeight: '700',
+ lineHeight: '120%',
+ m: '1.5rem',
+ },
+ button: {
+ backgroundColor: theme.palette.primary.main,
+ color: theme.palette.secondary.main,
+ width: '202px',
+ height: '48px',
+ textAlign: 'center',
+ border: `1px solid ${theme.palette.secondary[200]}`,
+ '&:hover': {
+ backgroundColor: theme.palette.primary.main,
+ color: theme.palette.secondary.main[600],
+ },
+ },
+ };
+
+ return (
+
+
+ Our Products
+
+
+ {dataSource.map((item) => (
+ handleCardHover(item.id)}
+ onMouseLeave={handleCardLeave}
+ >
+
+
+
+
+ {item?.productMeta?.title}
+
+
+ {item?.productMeta?.desc}
+
+
+
+
+
+
+
+ ))}
+
+
+
+
+
+ );
+};
+
+export default FeaturedProducts;
diff --git a/src/scenes/Dashboard/index.tsx b/src/scenes/Dashboard/index.tsx
index d9301c9..58a8ca4 100644
--- a/src/scenes/Dashboard/index.tsx
+++ b/src/scenes/Dashboard/index.tsx
@@ -1,85 +1,13 @@
-import React from 'react';
-import { Box, Button, Typography, useTheme } from '@mui/material';
-
+import Banner from './fragments/Banner';
+import FeaturedProducts from './fragments/FeaturedProducts';
import './dashboard.styles.css';
const Dashboard = () => {
- const theme = useTheme();
- const classes = {
- bannerContainer: {
- height: '1007.93px',
- background: "url('/assets/heroImage.png')",
- backgroundRepeat: 'no-repeat',
- backgroundSize: 'cover',
- backgroundPosition: 'center',
- opacity: '0.85',
- position: 'relative',
- zIndex: 1,
- },
- bannerAdv: {
- letterSpacing: '3px',
- fontWeight: '600',
- fontSize: '16px',
- '&.MuiTypography-subtitle1': {},
- },
- bannerTitle: {
- color: '#B88E2F',
- fontSize: '52px',
- fontStyle: 'normal',
- fontWeight: '700',
- lineHeight: '65px',
- '&.MuiTypography-h6': {},
- },
- bannerDesc: {
- width: '546px',
- fontSize: '18px',
- fontWeight: '500',
- lineHeight: '24px',
- letterSpacing: '1.2px',
- m: '1rem 0',
- '&.MuiTypography-body1': {},
- },
- button: {
- backgroundColor: theme.palette.secondary.main,
- color: theme.palette.primary.main,
- p: '1.7rem 4rem',
- width: '190px',
- height: '24px',
- textAlign: 'center',
- borderRadius: 'none',
- '&:hover': {
- backgroundColor: theme.palette.secondary[400],
- color: theme.palette.primary.main,
- },
- },
- };
return (
-
-
-
-
- New Arrival
-
-
- Discover Our New Collection
-
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec
- ullamcorper mattis.
-
-
-
-
-
-
+ <>
+
+
+ >
);
};
diff --git a/src/styles/global.css b/src/styles/global.css
index 059c7bb..ec81dd6 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -9,8 +9,9 @@
}
:root {
- --primary: '#B88E2F';
- --font-color: '#333';
+ --primary: #b88e2f;
+ --font-color: #333;
+ --color-light-bg: #f4f5f7;
}
html,