├── public ├── robots.txt ├── favicon.ico ├── logo192.png ├── logo512.png ├── manifest.json └── index.html ├── src ├── assets │ ├── apple.png │ └── avatar.jpg ├── index.js ├── App.js ├── index.css └── components │ ├── Add.jsx │ ├── Dashboard.jsx │ ├── Navbar.jsx │ ├── Orders.jsx │ ├── Sales.jsx │ ├── Statistic.jsx │ ├── Shopping.jsx │ ├── Analytic.jsx │ └── Sidebar.jsx ├── .gitignore ├── package.json └── README.md /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zakaria-29-dev/React-UI-Design-Sales-Analytics-Dashboard-Javascript-HTML-CSS-recharts/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zakaria-29-dev/React-UI-Design-Sales-Analytics-Dashboard-Javascript-HTML-CSS-recharts/HEAD/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zakaria-29-dev/React-UI-Design-Sales-Analytics-Dashboard-Javascript-HTML-CSS-recharts/HEAD/public/logo512.png -------------------------------------------------------------------------------- /src/assets/apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zakaria-29-dev/React-UI-Design-Sales-Analytics-Dashboard-Javascript-HTML-CSS-recharts/HEAD/src/assets/apple.png -------------------------------------------------------------------------------- /src/assets/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zakaria-29-dev/React-UI-Design-Sales-Analytics-Dashboard-Javascript-HTML-CSS-recharts/HEAD/src/assets/avatar.jpg -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'styled-components'; 3 | import Sidebar from './components/Sidebar' 4 | import Dashboard from './components/Dashboard' 5 | 6 | function App() { 7 | return ( 8 |
9 | 10 | 11 |
12 | 13 | ); 14 | } 15 | 16 | export default App; 17 | const Div = styled.div ` 18 | position: relative; 19 | `; 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | body { 7 | margin: 0; 8 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 9 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 10 | sans-serif; 11 | background-color: #FFFFFF; 12 | 13 | } 14 | 15 | ::-webkit-scrollbar { 16 | background-color: #EBECF1; 17 | width: 0.4vw; 18 | } 19 | ::-webkit-scrollbar-thumb{ 20 | background: black; 21 | } 22 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /src/components/Add.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import styled from 'styled-components' 3 | function Add() { 4 | return ( 5 |
6 |
7 | 10 |
11 |
12 | ) 13 | } 14 | 15 | export default Add 16 | const Section = styled.section` 17 | display: flex; 18 | gap: 1rem; 19 | div{ 20 | button { 21 | border-radius: 0.5rem; 22 | padding: 1rem 6.6rem; 23 | border: none; 24 | cursor: pointer; 25 | background-color: black; 26 | color: white; 27 | font-weight: bold; 28 | &:hover { 29 | background-color: red; 30 | } 31 | } 32 | } 33 | `; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sales", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.16.1", 7 | "@testing-library/react": "^12.1.2", 8 | "@testing-library/user-event": "^13.5.0", 9 | "react": "^17.0.2", 10 | "react-dom": "^17.0.2", 11 | "react-icons": "^4.3.1", 12 | "react-scripts": "5.0.0", 13 | "recharts": "^2.1.8", 14 | "scrollreveal": "^4.0.9", 15 | "styled-components": "^5.3.3", 16 | "web-vitals": "^2.1.3" 17 | }, 18 | "scripts": { 19 | "start": "react-scripts start", 20 | "build": "react-scripts build", 21 | "test": "react-scripts test", 22 | "eject": "react-scripts eject" 23 | }, 24 | "eslintConfig": { 25 | "extends": [ 26 | "react-app", 27 | "react-app/jest" 28 | ] 29 | }, 30 | "browserslist": { 31 | "production": [ 32 | ">0.2%", 33 | "not dead", 34 | "not op_mini all" 35 | ], 36 | "development": [ 37 | "last 1 chrome version", 38 | "last 1 firefox version", 39 | "last 1 safari version" 40 | ] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/components/Dashboard.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import styled from 'styled-components' 3 | import Navbar from './Navbar' 4 | import Statistic from './Statistic' 5 | import Sales from './Sales' 6 | import Orders from './Orders' 7 | import Analytic from './Analytic' 8 | import Shopping from './Shopping' 9 | import Add from './Add' 10 | 11 | function Dashboard() { 12 | return ( 13 |
14 | 15 |
16 |
17 | 18 | 19 | 20 |
21 |
22 | 23 | 24 | 25 |
26 |
27 |
28 | ) 29 | } 30 | 31 | export default Dashboard 32 | const Section = styled.section ` 33 | margin-left: 18vw; 34 | padding: 2rem; 35 | height: 100%; 36 | .grid{ 37 | display: grid; 38 | grid-template-columns: 70% 28%; 39 | gap: 2rem; 40 | margin-top: 2rem; 41 | .grid_1 { 42 | z-index: 2; 43 | width: 100%; 44 | display: flex; 45 | flex-direction: column; 46 | gap: 1rem; 47 | } 48 | .grid_2 { 49 | z-index: 2; 50 | display: flex; 51 | flex-direction: column; 52 | gap: 1rem; 53 | } 54 | } 55 | 56 | `; 57 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/components/Navbar.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import styled from 'styled-components' 3 | import { BiSearch } from "react-icons/bi"; 4 | import { AiOutlineCalendar } from "react-icons/ai"; 5 | import { AiOutlineBell } from "react-icons/ai"; 6 | import { AiOutlineCaretDown } from "react-icons/ai"; 7 | import avatarImage from "../assets/avatar.jpg" 8 | function Navbar() { 9 | return ( 10 | 31 | ) 32 | } 33 | 34 | export default Navbar 35 | const Nav = styled.nav` 36 | display: flex; 37 | justify-content: space-between; 38 | color: white; 39 | .title { 40 | h1{ 41 | margin-left: 0.5rem; 42 | color: black; 43 | font-weight: bold; 44 | margin-top: 1rem; 45 | } 46 | } 47 | .notification { 48 | display: flex; 49 | align-items: center; 50 | margin-top: -10px; 51 | .date { 52 | background-color: #F8F9FE; 53 | display: flex; 54 | align-items: center; 55 | gap: 1rem; 56 | padding: 1rem; 57 | border-radius: 1rem; 58 | svg { 59 | color: black; 60 | } 61 | span { 62 | color: black; 63 | } 64 | } 65 | .icon { 66 | display: flex; 67 | align-items: center; 68 | gap: 1rem; 69 | padding: 1rem; 70 | svg { 71 | color: black; 72 | } 73 | span{ 74 | color: black; 75 | } 76 | .image { 77 | display: flex; 78 | gap: 1rem; 79 | img{ 80 | height: 2.5rem; 81 | width: 2.5rem; 82 | border-radius: 3rem; 83 | } 84 | } 85 | } 86 | } 87 | `; 88 | -------------------------------------------------------------------------------- /src/components/Orders.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import styled from 'styled-components' 3 | import apple from "../assets/apple.png" 4 | function Orders() { 5 | return ( 6 |
7 |
8 |
9 |
10 |

Recent Order

11 |
12 |
13 | 14 | 15 |
16 |
17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
Tracking IDProduct NameDatePriceStatus
#9876543 Apple WatchJul 29, 2021$329
34 |
35 |
36 |
37 | ) 38 | } 39 | 40 | export default Orders 41 | const Section = styled.section` 42 | .orders { 43 | color: black; 44 | width: 100%; 45 | .orders__details { 46 | display: flex; 47 | justify-content: space-between; 48 | margin: 1rem 0 ; 49 | div { 50 | display: flex; 51 | gap: 1rem; 52 | button { 53 | padding: 0.4rem 1rem; 54 | border: none; 55 | cursor: pointer; 56 | background-color: white; 57 | color: #668DFF; 58 | font-weight: bold; 59 | } 60 | } 61 | } 62 | .orders__table { 63 | display: flex; 64 | justify-content: space-between; 65 | margin: 1rem 0; 66 | table { 67 | border-collapse: collapse; 68 | width: 100%; 69 | th, td { 70 | text-align: center; 71 | padding: 5px; 72 | justify-content: space-evenly; 73 | button { 74 | border-radius: 0.3rem; 75 | padding: 0.4rem 1rem; 76 | border: none; 77 | cursor: pointer; 78 | background-color: #EEF4FF; 79 | color: blue; 80 | font-weight: bold; 81 | } 82 | img { 83 | height: 2rem; 84 | width: 2rem; 85 | } 86 | span { 87 | margin-top: 0.2 rem; 88 | } 89 | } 90 | .img { 91 | display: flex; 92 | justify-content: center; 93 | } 94 | } 95 | } 96 | } 97 | `; -------------------------------------------------------------------------------- /src/components/Sales.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import styled from "styled-components"; 3 | import { AreaChart, Area, Tooltip, ResponsiveContainer } from "recharts"; 4 | import { AiOutlineCaretDown } from "react-icons/ai"; 5 | 6 | function Sales() { 7 | return ( 8 |
9 |
10 |
11 |
12 |

Sales Overview

13 | 14 |
15 |
16 | 17 | 21 |
22 |
23 |
24 | 25 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 46 | 52 | 53 | 54 |
55 |
56 |
57 | ) 58 | } 59 | 60 | export default Sales 61 | const data = [ 62 | { 63 | data2: 2000, 64 | data1: 2400, 65 | }, 66 | { 67 | data2: 4000, 68 | data1: 1398, 69 | }, 70 | { 71 | data2: 5000, 72 | data1: 12800, 73 | }, 74 | { 75 | data2: 8780, 76 | data1: 3908, 77 | }, 78 | { 79 | data2: 9890, 80 | data1: 4800, 81 | }, 82 | { 83 | data2: 11390, 84 | data1: 3800, 85 | }, 86 | { 87 | data2: 3490, 88 | data1: 4300, 89 | }, 90 | ]; 91 | const Section = styled.section` 92 | .sales { 93 | color: black; 94 | width: 100%; 95 | .sales__details { 96 | display: flex; 97 | justify-content: space-between; 98 | margin: 1rem 0; 99 | div { 100 | display: flex; 101 | gap: 1rem; 102 | button { 103 | border-radius: 0.5rem; 104 | padding: 0.4rem 1rem; 105 | border: none; 106 | cursor: pointer; 107 | background-color: #EEF4FF; 108 | color: black; 109 | svg { 110 | font-size: 0.6rem; 111 | } 112 | } 113 | } 114 | } 115 | .sales__graph { 116 | height: 10rem; 117 | width: 100%; 118 | .recharts-default-tooltip { 119 | background-color: black !important; 120 | border-color: black !important; 121 | color : white !important; 122 | } 123 | } 124 | } 125 | `; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /src/components/Statistic.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import styled from 'styled-components' 3 | import { AiFillTag } from "react-icons/ai"; 4 | import { AiFillExperiment } from "react-icons/ai"; 5 | import { AiFillDollarCircle } from "react-icons/ai"; 6 | import { AiOutlineArrowUp } from "react-icons/ai"; 7 | import { AiOutlineArrowDown } from "react-icons/ai"; 8 | function Statistic() { 9 | return ( 10 |
11 |
12 |
13 |
14 | 15 |
16 |
17 |
$123,456,789
18 |
19 |
20 |
21 |
TOTAL SALES
22 | +18% 23 | 24 |
25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 |
$123,456,345
33 |
34 |
35 |
36 |
TOTAL EXPENSES
37 | -9% 38 | 39 |
40 |
41 |
42 |
43 |
44 | 45 |
46 |
47 |
$123,456,876
48 |
49 |
50 |
51 |
TOTAL REVENUE
52 | +24% 53 | 54 |
55 |
56 |
57 | ) 58 | } 59 | 60 | export default Statistic 61 | const Section = styled.section ` 62 | display: grid; 63 | grid-template-columns: repeat(3, 1fr); 64 | gap: 1rem; 65 | .color1 { 66 | background-color: #EEF4FF; 67 | } 68 | .color2{ 69 | background-color: #FDF4F5; 70 | } 71 | .color3{ 72 | background-color: #FFFCE4; 73 | } 74 | .analytic { 75 | padding: 1rem 2rem 1rem 2rem; 76 | border-radius: 1rem; 77 | color: black; 78 | justify-content: space-evenly; 79 | align-items: center; 80 | gap: 1rem; 81 | transition: 0.5s ease-in-out; 82 | &:hover { 83 | background-color: #D4E0FF; 84 | color: black; 85 | svg { 86 | color: black; 87 | } 88 | } 89 | .design{ 90 | display: flex; 91 | align-items: center; 92 | gap: 1rem; 93 | .logo { 94 | background-color: white; 95 | border-radius: 1rem; 96 | border: 1px solid black; 97 | display: flex; 98 | justify-content: center; 99 | align-items: center; 100 | padding: 1.5rem; 101 | svg { 102 | font-size: 1.5rem; 103 | } 104 | } 105 | } 106 | .total { 107 | display: flex; 108 | align-items: center; 109 | gap: 1rem; 110 | justify-content: space-evenly; 111 | margin-top: 20px; 112 | .svg1 { 113 | color: green; 114 | } 115 | .svg2 { 116 | color: red; 117 | } 118 | .t1 { 119 | color: green; 120 | } 121 | .t2{ 122 | color: red; 123 | } 124 | h6{ 125 | color: grey; 126 | } 127 | } 128 | } 129 | `; 130 | -------------------------------------------------------------------------------- /src/components/Shopping.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import styled from "styled-components"; 3 | import { AiOutlineShoppingCart } from "react-icons/ai"; 4 | import { AiOutlineShopping } from "react-icons/ai"; 5 | import { AiOutlineTeam } from "react-icons/ai"; 6 | import { AiFillCaretUp } from "react-icons/ai"; 7 | 8 | function Shopping() { 9 | return ( 10 |
11 |
12 |
13 |
14 | 15 |
16 |
17 |
18 |
ONLINE ORDERS
19 | 20 | 21 |
22 |
23 |
12302
24 | 25 | 146 26 |
27 | 28 |
29 |
30 |
31 |
32 | 33 |
34 |
35 |
36 |
OFFLINE ORDERS
37 | 38 | 39 |
40 |
41 |
10893
42 | 43 | 67 44 |
45 | 46 |
47 |
48 |
49 |
50 | 51 | 52 |
53 |
54 |
55 |
TOTAL USERS
56 | 57 | 58 |
59 |
60 |
78691
61 | 62 | 324 63 |
64 | 65 |
66 |
67 |
68 |
69 | 70 |
71 |
72 |
73 |
TOTAL PRODUCTS
74 | 75 | 76 |
77 |
78 |
1032
79 | 80 | 48 81 |
82 | 83 |
84 | 85 | 86 | 87 |
88 | ) 89 | } 90 | 91 | export default Shopping 92 | const Section = styled.section` 93 | display: grid; 94 | grid-template-columns: repeat(2, 1fr); 95 | gap: 1rem; 96 | .shopping { 97 | padding: 0.5rem 0.5rem 0.5rem 0.5rem; 98 | border-radius: 1rem; 99 | color: black; 100 | background-color: #F8F9FE; 101 | justify-content: space-evenly; 102 | align-items: center; 103 | gap: 0.5rem; 104 | transition: 0.5s ease-in-out; 105 | &:hover { 106 | background-color: #D4E0FF; 107 | color: black; 108 | svg { 109 | color: black; 110 | } 111 | } 112 | .design { 113 | display: flex; 114 | align-items: center; 115 | gap: 0.5rem; 116 | .img1{ 117 | background-color: #668DFF; 118 | } 119 | .img2{ 120 | background-color: #FFB2C3; 121 | } 122 | .img3{ 123 | background-color: #FFDD00; 124 | } 125 | .img4{ 126 | background-color: #030303; 127 | } 128 | .logo { 129 | border-radius: 0.3rem; 130 | display: flex; 131 | justify-content: center; 132 | align-items: center; 133 | padding: 0.8rem; 134 | svg { 135 | font-size: 1rem; 136 | color: white; 137 | } 138 | } 139 | } 140 | .total { 141 | display: flex; 142 | align-items: center; 143 | gap: 0.5rem; 144 | justify-content: space-evenly; 145 | margin-top: 10px; 146 | h6{ 147 | color: grey; 148 | } 149 | } 150 | .number { 151 | display: flex; 152 | align-items: center; 153 | gap: 0.5rem; 154 | justify-content: space-evenly; 155 | margin-top: 10px; 156 | .svg1 { 157 | color: green; 158 | } 159 | .t1{ 160 | color: green; 161 | } 162 | h6{ 163 | color: black; 164 | } 165 | } 166 | 167 | } 168 | 169 | ` 170 | ; -------------------------------------------------------------------------------- /src/components/Analytic.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import styled from "styled-components"; 3 | import { AreaChart, Area, Tooltip, ResponsiveContainer } from "recharts"; 4 | const data = [ 5 | { data: 4500 }, 6 | { 7 | data: 5000, 8 | }, 9 | { 10 | data: 4700, 11 | }, 12 | { 13 | data: 4400, 14 | }, 15 | { 16 | data: 4800, 17 | }, 18 | { 19 | data: 5300, 20 | }, 21 | { 22 | data: 5800, 23 | }, 24 | { 25 | data: 6000, 26 | }, 27 | { 28 | data: 6300, 29 | }, 30 | { 31 | data: 6580, 32 | }, 33 | { 34 | data: 6780, 35 | }, 36 | { 37 | data: 6680, 38 | }, 39 | { 40 | data: 6500, 41 | }, 42 | { 43 | data: 6300, 44 | }, 45 | { 46 | data: 5900, 47 | }, 48 | { 49 | data: 5700, 50 | }, 51 | { 52 | data: 5500, 53 | }, 54 | { 55 | data: 5300, 56 | }, 57 | { 58 | data: 5100, 59 | }, 60 | { 61 | data: 5090, 62 | }, 63 | { 64 | data: 5300, 65 | }, 66 | { 67 | data: 5800, 68 | }, 69 | { 70 | data: 6000, 71 | }, 72 | { 73 | data: 6300, 74 | }, 75 | { 76 | data: 6780, 77 | }, 78 | { 79 | data: 6500, 80 | }, 81 | { 82 | data: 6300, 83 | }, 84 | { 85 | data: 6500, 86 | }, 87 | { 88 | data: 6700, 89 | }, 90 | { 91 | data: 7000, 92 | }, 93 | { 94 | data: 7300, 95 | }, 96 | { 97 | data: 7500, 98 | }, 99 | { 100 | data: 7700, 101 | }, 102 | { 103 | data: 8090, 104 | }, 105 | { 106 | data: 8190, 107 | }, 108 | { 109 | data: 7990, 110 | }, 111 | 112 | { 113 | data: 7700, 114 | }, 115 | { 116 | data: 7500, 117 | }, 118 | { 119 | data: 7300, 120 | }, 121 | { 122 | data: 7000, 123 | }, 124 | { 125 | data: 6700, 126 | }, 127 | { 128 | data: 6500, 129 | }, 130 | { 131 | data: 6300, 132 | }, 133 | { 134 | data: 6500, 135 | }, 136 | { 137 | data: 6780, 138 | }, 139 | { 140 | data: 6300, 141 | }, 142 | { 143 | data: 6000, 144 | }, 145 | { 146 | data: 5800, 147 | }, 148 | 149 | { 150 | data: 5490, 151 | }, 152 | { 153 | data: 6000, 154 | }, 155 | { 156 | data: 8000, 157 | }, 158 | ]; 159 | function Analytic() { 160 | return ( 161 |
162 |
163 |
164 |
165 |

Sales Analytics

166 |
167 |
168 | 169 |
170 |
171 |
172 | 173 | 179 | 180 | 189 | 190 | 191 |
192 |
193 |
194 | ) 195 | } 196 | 197 | export default Analytic 198 | const Section = styled.section` 199 | .analytics { 200 | color: black; 201 | width: 100%; 202 | .analytics__details { 203 | display: flex; 204 | justify-content: space-between; 205 | margin: 1rem 0; 206 | div { 207 | display: flex; 208 | gap: 1rem; 209 | button { 210 | border-radius: 0.5rem; 211 | padding: 0.4rem 1rem; 212 | border: none; 213 | cursor: pointer; 214 | background-color: #EEF4FF; 215 | color: black; 216 | } 217 | } 218 | } 219 | .analytics__graph { 220 | height: 10rem; 221 | width: 100%; 222 | .recharts-default-tooltip { 223 | background-color: black !important; 224 | border-color: black !important; 225 | color : white !important; 226 | } 227 | } 228 | } 229 | 230 | `; 231 | -------------------------------------------------------------------------------- /src/components/Sidebar.jsx: -------------------------------------------------------------------------------- 1 | import React, {useState, useEffect} from 'react' 2 | import styled from 'styled-components' 3 | import { AiOutlineAppstore } from "react-icons/ai"; 4 | import { AiOutlineShoppingCart } from "react-icons/ai"; 5 | import { AiOutlineShopping } from "react-icons/ai"; 6 | import { AiOutlineLogout } from "react-icons/ai"; 7 | import { AiOutlineMessage } from "react-icons/ai"; 8 | import { AiOutlinePieChart } from "react-icons/ai"; 9 | import { AiOutlineSetting } from "react-icons/ai"; 10 | import { AiOutlineUsergroupAdd } from "react-icons/ai"; 11 | import { AiFillCodeSandboxCircle } from "react-icons/ai"; 12 | import { SiAccusoft } from "react-icons/si"; 13 | 14 | function Sidebar() { 15 | const [currentLink, setCurrentLink] = useState(1); 16 | return ( 17 |
18 |
19 |
20 | 21 | AAE IdeaPro 22 |
23 |
24 | 89 |
90 |
91 |
92 | 93 | Unlock more information

94 | now ! Upgrade to PRO 95 |
96 |
97 |
98 | 99 | 100 | Logout 101 | 102 |
103 |
104 | ) 105 | } 106 | 107 | export default Sidebar 108 | const Section = styled.section` 109 | position: fixed; 110 | left: 0; 111 | background-color: #F8F9EF; 112 | height: 100vh; 113 | width: 18vw; 114 | display: flex; 115 | flex-direction: column; 116 | align-items: center; 117 | justify-content: space-between; 118 | padding: 2rem 0; 119 | gap: 2rem; 120 | .top{ 121 | display: flex; 122 | flex-direction: column; 123 | gap: 2rem; 124 | width: 100%; 125 | .brand { 126 | width: 100%; 127 | display: flex; 128 | justify-content: center; 129 | align-items: center; 130 | gap: 1.3rem 0; 131 | svg { 132 | color: blue; 133 | font-size: 2rem; 134 | } 135 | span { 136 | font-size: 1.5rem; 137 | font-weight: bold; 138 | color: black; 139 | } 140 | } 141 | .links { 142 | display: flex; 143 | justify-content: center; 144 | ul { 145 | list-style-type: none; 146 | display: flex; 147 | flex-direction: column; 148 | gap: 1rem; 149 | li{ 150 | padding: 0.6rem 2rem; 151 | border-radius: 0.3rem; 152 | &:hover { 153 | background-color: black; 154 | a{ 155 | color: white; 156 | } 157 | } 158 | a { 159 | text-decoration: none; 160 | display: flex; 161 | gap: 1rem; 162 | color: grey; 163 | svg { 164 | font-size: 1.4rem; 165 | } 166 | span { 167 | display: flex; 168 | gap: 2rem; 169 | } 170 | } 171 | } 172 | .active { 173 | background-color: black; 174 | a { 175 | color: white; 176 | } 177 | } 178 | } 179 | } 180 | } 181 | .map { 182 | width: 90%; 183 | display: flex; 184 | background-color:#EBECF1; 185 | padding-top: 10px; 186 | padding-bottom: 10px; 187 | flex-direction: column; 188 | justify-content: center; 189 | align-items: center; 190 | gap: 1rem; 191 | margin-top: -25px; 192 | border-radius: 0.5rem; 193 | svg { 194 | color: blue; 195 | font-size: 2rem; 196 | } 197 | } 198 | .logout { 199 | padding: 0.6rem 3rem; 200 | margin-left: -2rem; 201 | a { 202 | text-decoration: none; 203 | display: flex; 204 | align-items: center; 205 | justify-content: center; 206 | color: black; 207 | gap: 1rem; 208 | svg { 209 | font-size:1.4rem; 210 | } 211 | span { 212 | display: flex; 213 | } 214 | } 215 | } 216 | ` 217 | ; 218 | --------------------------------------------------------------------------------