create-bdpa-react-scaffold 1.7.2 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/create-ui-lib.js +37 -1
  2. package/package.json +1 -1
package/create-ui-lib.js CHANGED
@@ -738,15 +738,51 @@ export default function Table({ columns, data }) {
738
738
  `);
739
739
 
740
740
  write("src/components/ui/Navbar.jsx", `
741
- import { Menu } from "lucide-react";
741
+ import { Menu, ChevronDown } from "lucide-react";
742
+ import { useState } from "react";
742
743
 
743
744
  export default function Navbar({ onMenuClick }) {
745
+ const [dropdownOpen, setDropdownOpen] = useState(false);
746
+
747
+ const dropdownItems = [
748
+ { label: "Profile", href: "#" },
749
+ { label: "Settings", href: "#" },
750
+ { label: "Help", href: "#" },
751
+ { label: "Feedback", href: "#" },
752
+ { label: "Logout", href: "#" }
753
+ ];
754
+
744
755
  return (
745
756
  <nav className="bg-white border-b border-gray-200 px-4 py-3 flex items-center justify-between">
746
757
  <button className="md:hidden" onClick={onMenuClick}>
747
758
  <Menu />
748
759
  </button>
749
760
  <h1 className="text-xl font-bold">BDPA React Scaffold and Demo</h1>
761
+
762
+ {/* Dropdown Menu */}
763
+ <div className="relative">
764
+ <button
765
+ onClick={() => setDropdownOpen(!dropdownOpen)}
766
+ className="flex items-center gap-2 px-3 py-2 rounded hover:bg-gray-100"
767
+ >
768
+ Menu
769
+ <ChevronDown size={18} />
770
+ </button>
771
+
772
+ {dropdownOpen && (
773
+ <div className="absolute right-0 mt-2 w-48 bg-white border border-gray-200 rounded-lg shadow-lg z-50">
774
+ {dropdownItems.map((item, index) => (
775
+ <a
776
+ key={index}
777
+ href={item.href}
778
+ className="block px-4 py-2 hover:bg-gray-100 first:rounded-t-lg last:rounded-b-lg"
779
+ >
780
+ {item.label}
781
+ </a>
782
+ ))}
783
+ </div>
784
+ )}
785
+ </div>
750
786
  </nav>
751
787
  );
752
788
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bdpa-react-scaffold",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
 
5
5
  "description": "Scaffold a React + Tailwind UI library demo via Vite.",
6
6
  "bin": {