Spaces:
Running
Running
Download src/components/NavBar.js from Madan08/project-spark-generator: direct link, hf CLI and curl.
- Browser
- Download file 4.09 kB
-
https://huggingface.co/spaces/Madan08/project-spark-generator/resolve/main/src/components/NavBar.js
- Command line
-
hf download hf://spaces/Madan08/project-spark-generator/src/components/NavBar.js
-
curl -L -o NavBar.js https://huggingface.co/spaces/Madan08/project-spark-generator/resolve/main/src/components/NavBar.js
4.09 kB
| import React, { useState } from 'react'; | |
| import { Link } from 'react-router-dom'; | |
| import { FiZap, FiMenu, FiX } from 'react-icons/fi'; | |
| const NavBar = () => { | |
| const [mobileMenuOpen, setMobileMenuOpen] = useState(false); | |
| return ( | |
| <nav className="bg-white shadow-sm"> | |
| <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> | |
| <div className="flex justify-between h-16"> | |
| <div className="flex"> | |
| <div className="flex-shrink-0 flex items-center"> | |
| <FiZap className="text-primary-500" /> | |
| <span className="ml-2 text-xl font-semibold text-gray-900">Project Spark</span> | |
| </div> | |
| </div> | |
| <div className="hidden sm:ml-6 sm:flex sm:space-x-8"> | |
| <Link to="/" className="border-primary-500 text-gray-900 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium"> | |
| Home | |
| </Link> | |
| <Link to="/templates" className="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium"> | |
| Templates | |
| </Link> | |
| <Link to="/features" className="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium"> | |
| Features | |
| </Link> | |
| <Link to="/pricing" className="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium"> | |
| Pricing | |
| </Link> | |
| </div> | |
| <div className="hidden sm:ml-6 sm:flex sm:items-center"> | |
| <Link to="/templates" className="bg-primary-500 hover:bg-primary-600 text-white px-4 py-2 rounded-md text-sm font-medium"> | |
| Get Started | |
| </Link> | |
| </div> | |
| <div className="-mr-2 flex items-center sm:hidden"> | |
| <button | |
| onClick={() => setMobileMenuOpen(!mobileMenuOpen)} | |
| className="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-primary-500" | |
| > | |
| {mobileMenuOpen ? <FiX /> : <FiMenu />} | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| {/* Mobile menu */} | |
| {mobileMenuOpen && ( | |
| <div className="sm:hidden"> | |
| <div className="pt-2 pb-3 space-y-1"> | |
| <Link | |
| to="/" | |
| className="bg-primary-50 border-primary-500 text-primary-500 block pl-3 pr-4 py-2 border-l-4 text-base font-medium" | |
| > | |
| Home | |
| </Link> | |
| <Link | |
| to="/templates" | |
| className="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium" | |
| > | |
| Templates | |
| </Link> | |
| <Link | |
| to="/features" | |
| className="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium" | |
| > | |
| Features | |
| </Link> | |
| <Link | |
| to="/pricing" | |
| className="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium" | |
| > | |
| Pricing | |
| </Link> | |
| </div> | |
| <div className="pt-4 pb-3 border-t border-gray-200"> | |
| <div className="flex items-center px-4"> | |
| <Link | |
| to="/templates" | |
| className="w-full flex items-center justify-center px-4 py-2 border border-transparent text-base font-medium rounded-md text-white bg-primary-500 hover:bg-primary-600" | |
| > | |
| Get Started | |
| </Link> | |
| </div> | |
| </div> | |
| </div> | |
| )} | |
| </nav> | |
| ); | |
| }; | |
| export default NavBar; |