From 2cdeb8ae898f121e072bb9cacd2f4b9f95ca62a9 Mon Sep 17 00:00:00 2001 From: Akira Date: Wed, 6 Jan 2021 16:59:25 -0500 Subject: [PATCH 1/2] Created footer --- frontend/components/Footer/Footer.module.css | 4 +- frontend/components/Footer/index.tsx | 53 ++++++++++++++++++-- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/frontend/components/Footer/Footer.module.css b/frontend/components/Footer/Footer.module.css index 7ae96f2..7b889b3 100644 --- a/frontend/components/Footer/Footer.module.css +++ b/frontend/components/Footer/Footer.module.css @@ -1,7 +1,9 @@ .footer { - width: 100%; + width: 101.23%; height: 100px; border-top: 1px solid #eaeaea; + box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.25); + background-color: #343A40; display: flex; justify-content: center; align-items: center; diff --git a/frontend/components/Footer/index.tsx b/frontend/components/Footer/index.tsx index 1263b9b..20fb401 100644 --- a/frontend/components/Footer/index.tsx +++ b/frontend/components/Footer/index.tsx @@ -1,17 +1,62 @@ +import { + Box, + Button, + Center, + Flex, + Grid, + GridItem, + Heading, + IconButton, + Spacer, + Text, + useColorMode, + useColorModeValue, +} from "@chakra-ui/react"; + import React from "react"; import styles from "./Footer.module.css"; export const Footer = (): JSX.Element => { return ( - ); }; From bf6c224cadf793f25bff867f936293911fc42ae9 Mon Sep 17 00:00:00 2001 From: Jarrod Servilla Date: Thu, 7 Jan 2021 15:51:41 -0500 Subject: [PATCH 2/2] added responsiveness to footer + tests --- frontend/components/Footer/Footer.module.css | 2 +- frontend/components/Footer/index.tsx | 86 ++++++++++---------- frontend/styles/globals.css | 2 + frontend/testing/components/Footer.test.tsx | 9 +- frontend/testing/helpers.tsx | 21 +++++ 5 files changed, 73 insertions(+), 47 deletions(-) diff --git a/frontend/components/Footer/Footer.module.css b/frontend/components/Footer/Footer.module.css index 7b889b3..9663993 100644 --- a/frontend/components/Footer/Footer.module.css +++ b/frontend/components/Footer/Footer.module.css @@ -3,7 +3,7 @@ height: 100px; border-top: 1px solid #eaeaea; box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.25); - background-color: #343A40; + background-color: #343a40; display: flex; justify-content: center; align-items: center; diff --git a/frontend/components/Footer/index.tsx b/frontend/components/Footer/index.tsx index 20fb401..13ea1d4 100644 --- a/frontend/components/Footer/index.tsx +++ b/frontend/components/Footer/index.tsx @@ -1,62 +1,60 @@ import { - Box, - Button, Center, Flex, - Grid, GridItem, Heading, - IconButton, - Spacer, + HStack, + SimpleGrid, Text, - useColorMode, - useColorModeValue, + useBreakpointValue, } from "@chakra-ui/react"; - import React from "react"; import styles from "./Footer.module.css"; +export const footerLinks = [ + "Terms", + "Privacy", + "Help", + "API", + "Status", + "Blog", +]; + export const Footer = (): JSX.Element => { + const verticalOffset = useBreakpointValue({ sm: "", md: "6" }); + const spacing = useBreakpointValue({ xs: 6, sm: 14 }); + return ( -
-
- - - - © 2020 White Van, Inc. - made with ❤ - by pizza van + +
+ + + + © 2020 White Van, Inc. + + + made with ❤ by pizza van - - Terms - - - Privacy - - - Help - - - API - - - Status - - - Blog - - + + + {footerLinks.map((link, index) => { + return ( + + {link} + + ); + })} + + +
- - {/* - - */} -
+ ); }; diff --git a/frontend/styles/globals.css b/frontend/styles/globals.css index 259eae1..eab45f4 100644 --- a/frontend/styles/globals.css +++ b/frontend/styles/globals.css @@ -16,6 +16,8 @@ a { } .container { + overflow-x: hidden; + overflow-y: hidden; min-height: 100vh; padding: 0 0.5rem; display: flex; diff --git a/frontend/testing/components/Footer.test.tsx b/frontend/testing/components/Footer.test.tsx index da6e070..87cdad0 100644 --- a/frontend/testing/components/Footer.test.tsx +++ b/frontend/testing/components/Footer.test.tsx @@ -2,7 +2,10 @@ import { render } from "@testing-library/react"; import { axe, toHaveNoViolations } from "jest-axe"; import React from "react"; -import { Footer } from "../../components/Footer"; +import { Footer, footerLinks } from "../../components/Footer"; +import { setupTests } from "../helpers"; + +setupTests(); describe("Footer", () => { expect.extend(toHaveNoViolations); @@ -15,6 +18,8 @@ describe("Footer", () => { it("Basic render functionality", () => { const { queryByText } = render(