From 491a9c8bb813af671cd87b378f5acb9fa02ce598 Mon Sep 17 00:00:00 2001 From: "[dyad]" Date: Thu, 11 Sep 2025 11:02:51 +0200 Subject: [PATCH] [dyad] Changed header theme color to #ffc905 - wrote 4 file(s) --- src/components/Header.tsx | 50 ++++++++++++------------- src/components/Layout.tsx | 17 +++++---- tailwind.config.js | 79 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+), 32 deletions(-) create mode 100644 tailwind.config.js diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 0b1f253..7d35f26 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,45 +1,45 @@ import { useState } from 'react'; -import { Search, Menu, Box } from 'lucide-react'; -import { Input } from '@/components/ui/input'; import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet'; -import { Button } from './ui/button'; +import { Button } from '@/components/ui/button'; +import { Menu } from 'lucide-react'; import { SidebarNav } from './SidebarNav'; +import { MadeWithDyad } from './made-with-dyad'; -const Header = () => { +export const Header = () => { const [isSheetOpen, setSheetOpen] = useState(false); + const handleLinkClick = () => { + setSheetOpen(false); + }; + return ( -
+
- - -
- -

JEI Stock Take

+ +
+
+

Navigation

+
+
+ +
+
- setSheetOpen(false)} />
-

Dashboard

+

Stock Management

-
-
- - -
- JEI Logo + {/* You can add user profile or other header elements here */} +
+ {/* Example: ... */}
); -}; - -export default Header; \ No newline at end of file +}; \ No newline at end of file diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 31558ba..747aac8 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -1,14 +1,17 @@ -import React from 'react'; -import Sidebar from './Sidebar'; -import Header from './Header'; +import Sidebar from './Sidebar'; // Corrected import +import { Header } from './Header'; -const Layout = ({ children }: { children: React.ReactNode }) => { +interface LayoutProps { + children: React.ReactNode; +} + +const Layout: React.FC = ({ children }) => { return ( -
+
-
+
-
+
{children}
diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..634b9bc --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,79 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + darkMode: ["class"], + content: [ + './pages/**/*.{ts,tsx}', + './components/**/*.{ts,tsx}', + './app/**/*.{ts,tsx}', + './src/**/*.{ts,tsx}', + ], + prefix: "", + theme: { + container: { + center: true, + padding: "2rem", + screens: { + "2xl": "1400px", + }, + }, + extend: { + colors: { + border: "hsl(var(--border))", + input: "hsl(var(--input))", + ring: "hsl(var(--ring))", + background: "hsl(var(--background))", + foreground: "hsl(var(--foreground))", + primary: { + DEFAULT: "hsl(var(--primary))", + foreground: "hsl(var(--primary-foreground))", + dark: "#1a202c", // Existing primary-dark + }, + secondary: { + DEFAULT: "hsl(var(--secondary))", + foreground: "hsl(var(----secondary-foreground))", + }, + destructive: { + DEFAULT: "hsl(var(--destructive))", + foreground: "hsl(var(--destructive-foreground))", + }, + muted: { + DEFAULT: "hsl(var(--muted))", + foreground: "hsl(var(--muted-foreground))", + }, + accent: { + DEFAULT: "hsl(var(--accent))", + foreground: "hsl(var(--accent-foreground))", + }, + popover: { + DEFAULT: "hsl(var(--popover))", + foreground: "hsl(var(--popover-foreground))", + }, + card: { + DEFAULT: "hsl(var(--card))", + foreground: "hsl(var(--card-foreground))", + }, + dyadYellow: "#ffc905", // New custom color + }, + borderRadius: { + lg: "var(--radius)", + md: "calc(var(--radius) - 2px)", + sm: "calc(var(--radius) - 4px)", + }, + keyframes: { + "accordion-down": { + from: { height: "0" }, + to: { height: "var(--radix-accordion-content-height)" }, + }, + "accordion-up": { + from: { height: "var(--radix-accordion-content-height)" }, + to: { height: "0" }, + }, + }, + animation: { + "accordion-down": "accordion-down 0.2s ease-out", + "accordion-up": "accordion-up 0.2s ease-out", + }, + }, + }, + plugins: [require("tailwindcss-animate")], +} \ No newline at end of file