diff --git a/components/LanguageButton.tsx b/components/LanguageButton.tsx new file mode 100644 index 0000000..84fee50 --- /dev/null +++ b/components/LanguageButton.tsx @@ -0,0 +1,60 @@ +import React, { Fragment, useState } from 'react'; +import { Menu, Transition } from '@headlessui/react' +import { ChevronDownIcon } from '@heroicons/react/solid' + +import { + US_ICON, + ES_ICON, +} from '../constants'; + +const LanguageButton = ({}) => { + + const [active, setActive] = useState(null) + + return ( + +
+ + Icon + + +
+ + + +
+ + US_icon + English + + + ES_icon + Spanish + +
+
+
+
+ ) +} + +export default LanguageButton diff --git a/components/Navbar.tsx b/components/Navbar.tsx index 6bc1555..06dc18c 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -7,6 +7,7 @@ import { } from '../constants/strings' import HamburgerButton from './HamburgerButton' +import LanguageButton from './LanguageButton' const renderNavItems = () => { return ( @@ -31,8 +32,8 @@ function MobileNav({open, setOpen}: any) { absolute top-0 bg-solid-white left-0 h-screen w-screen transform ${open ? '-translate-x-0' : '-translate-x-full'} transition-transform duration-300 ease-in-out filter drop-shadow-md `} > -
- +
+ Logo + ) diff --git a/constants/index.ts b/constants/index.ts index ec9e73b..7eb36eb 100644 --- a/constants/index.ts +++ b/constants/index.ts @@ -11,5 +11,7 @@ export const API_v1_URL: string = 'http://localhost:3000/api/v1' // Images export const HERO_IMAGE_URL = 'https://user-images.githubusercontent.com/49292858/183115188-87aa75f2-7123-472a-b20d-16766828f96c.png' export const LOGO_URL: string = 'https://setlife-solutions.s3.amazonaws.com/images/Logo.png' +export const US_ICON: string = 'https://setlife-solutions.s3.amazonaws.com/images/US_icon.png' +export const ES_ICON: string = 'https://setlife-solutions.s3.amazonaws.com/images/ES_icon.png' export const NAV_ITEMS: Array = [ABOUT, PORTFOLIO, CONSULTATION, SERVICES, SERVICE_PACKAGES] diff --git a/package.json b/package.json index 3c8d1ac..e63374a 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,8 @@ "@apollo/client": "^3.6.9", "@graphql-tools/merge": "^8.3.0", "@graphql-tools/schema": "^8.5.0", + "@headlessui/react": "^1.6.6", + "@heroicons/react": "^1.0.6", "apollo-server": "^3.9.0", "apollo-server-micro": "^3.9.0", "dotenv": "^16.0.1",