diff --git a/package.json b/package.json index ebee51b..d953f35 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-dashboard", "version": "0.1.0", "private": true, "dependencies": { - "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^13.5.0", "@types/jest": "^27.5.2", "@types/node": "^16.11.47", "@types/react": "^18.0.15", "@types/react-dom": "^18.0.6", "lucide-react": "^0.263.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", "typescript": "^4.7.4", "web-vitals": "^2.1.4" + "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^13.5.0", "@types/jest": "^27.5.2", "@types/node": "^16.11.45", "@types/react": "^18.0.15", "@types/react-dom": "^18.0.6", "lucide-react": "^0.263.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", "typescript": "^4.7.4", "web-vitals": "^2.1.4" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" @@ -18,8 +18,5 @@ "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] - }, - "devDependencies": { - "autoprefixer": "^10.4.7", "postcss": "^8.4.14", "tailwindcss": "^3.1.6" } } \ No newline at end of file diff --git a/src/App.css b/src/App.css index d0b82b0..89c0ad6 100644 --- a/src/App.css +++ b/src/App.css @@ -1,7 +1,33 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - .App { text-align: center; +} + +.App-logo { + height: 40vmin; + pointer-events: none; +} + +@media (prefers-reduced-motion: no-preference) { + .App-logo { + animation: App-logo-spin infinite 20s linear; + } +} + +.App-header { + background-color: #282c34; + padding: 20px; + color: white; +} + +.App-link { + color: #61dafb; +} + +@keyframes App-logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } } \ No newline at end of file diff --git a/src/components/Dashboard.tsx b/src/components/Dashboard.tsx index bfa382a..9d96824 100644 --- a/src/components/Dashboard.tsx +++ b/src/components/Dashboard.tsx @@ -1,113 +1,108 @@ import React from 'react'; -import { BarChart3, Users, TrendingUp, DollarSign, Calendar, Bell, Search, Settings, Menu } from 'lucide-react'; +import { BarChart3, Users, DollarSign, TrendingUp } from 'lucide-react'; + +interface StatCardProps { + title: string; + value: string; + icon: React.ReactNode; + trend: string; +} + +const StatCard: React.FC = ({ title, value, icon, trend }) => { + return ( +
+
+
+

{title}

+

{value}

+

{trend}

+
+
+ {icon} +
+
+
+ ); +}; const Dashboard: React.FC = () => { + const stats = [ + { + title: "Total Revenue", value: "$45,231", icon: , + trend: "+20.1% from last month" + }, + { + title: "Active Users", value: "2,350", icon: , + trend: "+180.1% from last month" + }, + { + title: "Sales", value: "12,234", icon: , + trend: "+19% from last month" + }, + { + title: "Growth Rate", value: "89.5%", icon: , + trend: "+2.5% from last month" + } + ]; + return ( -
- {/* Header */} -
-
-
- -

Dashboard

-
-
- - - -
+
+
+
+

Dashboard

+

Welcome to your analytics dashboard

-
- - {/* Main Content */} -
- {/* Stats Cards */} +
-
-
-
-

Total Users

-

2,543

-
- -
-

+12% from last month

-
- -
-
-
-

Revenue

-

$45,231

-
- -
-

+8% from last month

-
- -
-
-
-

Growth

-

+24%

-
- -
-

+3% from last month

-
- -
-
-
-

Analytics

-

98.5%

-
- -
-

+2% from last month

-
+ {stats.map((stat, index) => ( + + ))}
- - {/* Charts Section */} -
+ +
-

Revenue Overview

-
- -

Chart visualization would go here

+

Recent Activity

+
+
+
+ New user registered +
+
+
+ Payment received +
+
+
+ System update completed +
- +
-

User Activity

-
- -

Activity chart would go here

+

Quick Stats

+
+
+ Conversion Rate + 3.2% +
+
+ Bounce Rate + 24.5% +
+
+ Session Duration + 2m 34s +
- - {/* Recent Activity */} -
-

Recent Activity

-
- {[1, 2, 3, 4].map((item) => ( -
- User avatar -
-

User {item} completed an action

-

2 hours ago

-
- -
- ))} -
-
-
+
); }; diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..92a7d97 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,9 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [ + "./src/**/*.{js,jsx,ts,tsx}"], + theme: { + extend: {}, + }, + plugins: [], +} \ No newline at end of file