From a680840e5fc9485082a8e264028360a2ca393c83 Mon Sep 17 00:00:00 2001 From: Ovidio Rodriguez Date: Mon, 15 Aug 2022 12:05:45 -0400 Subject: [PATCH 1/4] Import headlessui and heroicons --- package.json | 2 ++ 1 file changed, 2 insertions(+) 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", From 9312ee5427045c9ba5211e01e778cef353c2c3b1 Mon Sep 17 00:00:00 2001 From: Ovidio Rodriguez Date: Mon, 15 Aug 2022 12:21:31 -0400 Subject: [PATCH 2/4] Import US and ES Icons --- constants/index.ts | 2 ++ 1 file changed, 2 insertions(+) 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] From 02c82eaef8d209fa7cb01881221107745caaeb20 Mon Sep 17 00:00:00 2001 From: Ovidio Rodriguez Date: Mon, 15 Aug 2022 12:21:56 -0400 Subject: [PATCH 3/4] Create LanguageButton component --- components/LanguageButton.tsx | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 components/LanguageButton.tsx 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 From 0d497187997d818a18aed4f9f6ea208bbf1c69c5 Mon Sep 17 00:00:00 2001 From: Ovidio Rodriguez Date: Mon, 15 Aug 2022 12:22:13 -0400 Subject: [PATCH 4/4] Import ne component to Nav --- components/Navbar.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 `} > -