Files
web2.0-frontend/src/components/NavigationMobile.tsx
T
2021-01-18 21:34:20 +02:00

45 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import React from "react";
import styled from "styled-components";
import { colors } from "@theme/colors";
import NavbarDropdownLink from "./NavbarDropdownLink";
import NavbarChildLink from "./NavbarChildLink";
const renderNavigationMobileItems = () => (
<>
<NavbarDropdownLink to="/kilta" text="Kilta " exploded>
<NavbarChildLink to="/kilta/toiminta">Toiminta</NavbarChildLink>
<NavbarChildLink to="/kilta/fuksi">Fuksi</NavbarChildLink>
<NavbarChildLink to="/kilta/kunnia">Kunnianosoitukset</NavbarChildLink>
<NavbarChildLink to="https://static.sahkoinsinoorikilta.fi">Arkisto</NavbarChildLink>
</NavbarDropdownLink>
<NavbarDropdownLink to="/opinnot_ja_ura" text="Opinnot ja ura" exploded />
<NavbarDropdownLink to="/yritysyhteistyo" text="Yritysyhteistyö" exploded />
<NavbarDropdownLink to="/yhteystiedot" text="Yhteystiedot" exploded>
{/* <NavbarChildLink to="https://en.wikipedia.org/wiki/Gay">Simo Höglund</NavbarChildLink> */}
</NavbarDropdownLink>
<NavbarDropdownLink to="/in_english" text="In English" exploded />
</>
);
const Nav = styled.nav`
padding: 1rem 2rem;
a {
fill: ${colors.lightBlue};
color: ${colors.lightBlue};
text-decoration: none;
}
`;
interface NavigationMobileProps {
mobileMenuOpen?: boolean;
}
const NavigationMobile: React.FC<NavigationMobileProps> = ({ mobileMenuOpen }) => (
<Nav hidden={!mobileMenuOpen}>
{renderNavigationMobileItems()}
</Nav>
);
export default NavigationMobile;