Skip to content

Commit

Permalink
AboutNavButton
Browse files Browse the repository at this point in the history
  • Loading branch information
syntapy committed Dec 3, 2024
1 parent 2dfbb56 commit e9bc0b7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 26 deletions.
29 changes: 29 additions & 0 deletions gatsby/src/components/nav/AboutNavButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import * as React from "react"
import { NavButton } from "../buttons"

import CareersSvg from "../../images/svg/subnav/careers.svg"
import CultureAndValuesSvg from "../../images/svg/subnav/culture_and_values.svg"

import { SUB_NAV_ICON_SIZE } from "./param.ts"

export default function AboutNavButton(props: ButtonProps & StyleProps & DataCyProps) {
const servicesItems: SubNavItem[] = [
{
icon: <CareersSvg width={SUB_NAV_ICON_SIZE} height={SUB_NAV_ICON_SIZE} />,
text: "Careers",
url: "https://careers.superformula.com/"
},
{
icon: <CultureAndValuesSvg width={SUB_NAV_ICON_SIZE} height={SUB_NAV_ICON_SIZE} />,
text: "Culture & Values",
url: "https://careers.superformula.com/culture-values"
}
]

return (<NavButton
dataCy="about-nav-item"
right={true}
className={props.className} href={props.href} text={props.text}
subNavItems={servicesItems}
/>)
}
27 changes: 1 addition & 26 deletions gatsby/src/components/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ import { SubNavProps } from "./subnav.tsx"
import { isMobile, ResponsiveProps } from "../utils"

import ServicesNavButton from "./nav/ServicesNavButton.tsx"
import AboutNavButton from "./nav/AboutNavButton.tsx"

// Menu Icons
import Chilidogmenu from "../images/svg/chilidogmenu.svg"
import Menuclose from "../images/svg/menuclose.svg"

// SubNav Icons
import CareersSvg from "../images/svg/subnav/careers.svg"
import CultureAndValuesSvg from "../images/svg/subnav/culture_and_values.svg"

import { StyleProps } from "../utils"

import * as stylesMobile from "../styles/navbar/mobile.module.css"
Expand Down Expand Up @@ -51,28 +48,6 @@ type ResponsiveNavItemsProps = NavItemsProps | ResponsiveProps

import { SUB_NAV_ICON_SIZE } from "./nav/param.ts"

function AboutNavButton(props: ButtonProps & StyleProps & DataCyProps) {
const servicesItems: SubNavItem[] = [
{
icon: <CareersSvg width={SUB_NAV_ICON_SIZE} height={SUB_NAV_ICON_SIZE} />,
text: "Careers",
url: "https://careers.superformula.com/"
},
{
icon: <CultureAndValuesSvg width={SUB_NAV_ICON_SIZE} height={SUB_NAV_ICON_SIZE} />,
text: "Culture & Values",
url: "https://careers.superformula.com/culture-values"
}
]

return (<NavButton
dataCy="about-nav-item"
right={true}
className={props.className} href={props.href} text={props.text}
subNavItems={servicesItems}
/>)
}

function NavItems(props: ResponsiveNavItemsProps | StyleProps) {
const closeBtnStyle: string = stylesMobile.closeBtn
const homeNavItemStyle: string = stylesDesktop.navItemsHomeNav
Expand Down

0 comments on commit e9bc0b7

Please sign in to comment.