From 2c582aaa60bcb78809af565fbc105e3031965cfc Mon Sep 17 00:00:00 2001 From: theoleuthardt Date: Sat, 15 Feb 2025 23:11:07 +0100 Subject: [PATCH] feat: new dropdown menu for output file format as standalone component --- frontend/src/app/doc-converter/page.tsx | 21 +++--- frontend/src/components/Dropdown.tsx | 93 +++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 10 deletions(-) create mode 100644 frontend/src/components/Dropdown.tsx diff --git a/frontend/src/app/doc-converter/page.tsx b/frontend/src/app/doc-converter/page.tsx index 8255217..469e550 100644 --- a/frontend/src/app/doc-converter/page.tsx +++ b/frontend/src/app/doc-converter/page.tsx @@ -6,6 +6,7 @@ import Footer from "../../components/Footer"; import Button from "../../components/Button"; import Link from "next/link"; import { ChevronDown, ChevronUp } from "lucide-react"; +import Dropdown from "@/components/Dropdown"; export default function DocConverter() { const [file, setFile] = useState(null); @@ -60,12 +61,16 @@ export default function DocConverter() {

doc-converter

- +
+ + {/* TODO: Fix Dropdown menu placement */} + +
{downloadUrl ? ( @@ -84,10 +89,6 @@ export default function DocConverter() { /> )}
- { - // TODO: Fix Table Head widths (fixed and the same as the max body width) - // TODO: Add hover animation to table head (scale-110, blue text, blue border) - }
{ + const [isOpen, setIsOpen] = useState(false); + + const toggleDropdown = () => { + setIsOpen(!isOpen); + }; + + const closeDropdown = () => { + setIsOpen(false); + }; + + return ( +
+
+ +
+
    +
  • + + Option 1 + +
  • +
  • + + Option 2 + +
  • +
  • + + Option 3 + +
  • +
+
+
+
+ ); +}; + +export default Dropdown;