Last active
October 18, 2018 18:20
-
-
Save trevdor/26d97358f2e9a6a84504e0384956b3b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { createStyledComponent } from 'mineral-ui/styles'; | |
import StartEnd from 'mineral-ui/StartEnd'; | |
import NavTabs from './NavTabs'; | |
import ProfileMenu from './ProfileMenu'; | |
const Header = createStyledComponent(StartEnd, ({ theme }) => ({ | |
backgroundColor: theme.panel_backgroundColor, | |
borderBottom: `1px solid ${theme.color_gray_30}`, | |
height: '56px', // don't hate me, it's a work-in-progress and this matches our comps | |
})); | |
const SiteHeader = () => ( | |
<Header paddingHorizontal="lg"> | |
<NavTabs /> | |
<ProfileMenu /> | |
</Header> | |
); | |
const NavTabs = () => ( | |
<Flex style={{ height: '100%' }}> | |
<NavTab id="work" linkTo="/work/list/board" messageKey="Navigation/work" /> | |
<NavTab | |
id="objectives" | |
linkTo="/objectives" | |
messageKey="Navigation/objectives" | |
/> | |
</Flex> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think this covers it. I omitted the
NavTab
component cuz it gets hairy (lotta styling), but it's essentially just a React Router link.Notably, we need the effect below where the underline of the "tab" sits at the bottom of the site header.