Skip to content

Instantly share code, notes, and snippets.

@trevdor
Last active October 18, 2018 18:20
Show Gist options
  • Save trevdor/26d97358f2e9a6a84504e0384956b3b8 to your computer and use it in GitHub Desktop.
Save trevdor/26d97358f2e9a6a84504e0384956b3b8 to your computer and use it in GitHub Desktop.
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>
);
@trevdor
Copy link
Author

trevdor commented Oct 18, 2018

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.
screen shot 2018-10-18 at 11 59 03 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment