diff --git a/frontend/src/components/Features.test.tsx b/frontend/src/components/Features.test.tsx new file mode 100644 index 00000000..b6014f11 --- /dev/null +++ b/frontend/src/components/Features.test.tsx @@ -0,0 +1,24 @@ +import { describe, it, expect } from "vitest"; +import { render, screen } from "@testing-library/react"; +import { Features } from "./Features"; + +describe("Features", () => { + it("renders all expected feature titles", () => { + render(); + + expect(screen.getByText("Per-Second Streaming")).toBeInTheDocument(); + expect(screen.getByText("Zero Overhead")).toBeInTheDocument(); + expect(screen.getByText("Institutional Grade")).toBeInTheDocument(); + }); + + it("renders exactly three feature cards", () => { + render(); + + const heading = screen.getByRole("heading", { level: 3, name: "Per-Second Streaming" }); + const cardGrid = heading.closest("div.grid"); + expect(cardGrid).not.toBeNull(); + + const headings = screen.getAllByRole("heading", { level: 3 }); + expect(headings).toHaveLength(3); + }); +}); diff --git a/frontend/src/components/MobileMockup.tsx b/frontend/src/components/MobileMockup.tsx index 28464c37..5e41ee6c 100644 --- a/frontend/src/components/MobileMockup.tsx +++ b/frontend/src/components/MobileMockup.tsx @@ -13,9 +13,13 @@ export const MobileMockup = () => { }, []); return ( -
+
{/* Phone Case/Outer Frame */} -
+ ); }; diff --git a/frontend/src/components/Navbar.tsx b/frontend/src/components/Navbar.tsx index 038ee642..50efaa97 100644 --- a/frontend/src/components/Navbar.tsx +++ b/frontend/src/components/Navbar.tsx @@ -6,6 +6,7 @@ import Link from "next/link"; import { useWallet } from "@/context/wallet-context"; import { ModeToggle } from "./ModeToggle"; import { WalletButton } from "./wallet/WalletButton"; +import { useModalDialog } from "@/hooks/useModalDialog"; const NAV_LINKS = [ { href: "/", label: "Home" }, @@ -69,23 +70,32 @@ export const Navbar = () => {
{isMobileMenuOpen && ( -
- {NAV_LINKS.map((link) => ( - setIsMobileMenuOpen(false)} - > - {link.label} - - ))} - -
+ setIsMobileMenuOpen(false)} /> )} ); }; + +const MobileMenu = ({ onClose }: { onClose: () => void }) => { + const dialogRef = useModalDialog({ onClose }); + + return ( +
+ {NAV_LINKS.map((link) => ( + + {link.label} + + ))} + +
+ ); +}; diff --git a/frontend/src/components/ui/UI_COMPONENTS.md b/frontend/src/components/ui/UI_COMPONENTS.md index 306c57d0..0a24d156 100644 --- a/frontend/src/components/ui/UI_COMPONENTS.md +++ b/frontend/src/components/ui/UI_COMPONENTS.md @@ -116,6 +116,12 @@ A glass-morphism card container with optional hover and glow effects. | `glow` | `boolean` | `false` | Adds a glowing shadow effect | | `hover` | `boolean` | `true` | Enables hover lift effect | +### Behavior Notes + +- **glow**: Applies the `glow-card` class for an accent-colored ambient glow around the card +- **hover** (default `true`): Lifts the card 1px on hover and adds an accent-tinted border/shadow; set `hover={false}` for static cards +- `children` is required — `Card` renders only the passed content inside the glass container + ### Usage Examples ```tsx