2017-06-06 22:08:08 +03:00
|
|
|
import React from 'react';
|
|
|
|
import styled from 'styled-components';
|
|
|
|
import remcalc from 'remcalc';
|
|
|
|
|
2017-11-02 17:18:25 +02:00
|
|
|
import { ViewContainer } from '../layout';
|
|
|
|
|
|
|
|
const Container = ViewContainer.extend`
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
align-content: stretch;
|
|
|
|
align-items: stretch;
|
|
|
|
max-height: ${remcalc(53)};
|
|
|
|
min-height: ${remcalc(53)};
|
|
|
|
`;
|
|
|
|
|
2017-06-06 22:08:08 +03:00
|
|
|
const Header = styled.div`
|
2017-10-30 13:52:53 +02:00
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
align-content: stretch;
|
|
|
|
align-items: stretch;
|
2017-07-11 17:11:52 +03:00
|
|
|
background-color: ${props => props.theme.brandBackground};
|
2017-06-06 22:08:08 +03:00
|
|
|
max-height: ${remcalc(53)};
|
|
|
|
min-height: ${remcalc(53)};
|
|
|
|
line-height: ${remcalc(25)};
|
|
|
|
`;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @example ./usage.md
|
|
|
|
*/
|
2017-11-16 13:48:20 +02:00
|
|
|
export default ({ children, fluid, ...rest }) => (
|
2017-11-02 17:18:25 +02:00
|
|
|
<Header {...rest}>
|
2017-11-16 13:48:20 +02:00
|
|
|
<Container fluid={fluid}>{children}</Container>
|
2017-11-02 17:18:25 +02:00
|
|
|
</Header>
|
|
|
|
);
|
2017-06-06 22:08:08 +03:00
|
|
|
|
2017-11-09 13:27:32 +02:00
|
|
|
export { default as HeaderItem, Anchor as HeaderAnchor } from './item';
|
2017-11-02 17:18:25 +02:00
|
|
|
export { default as HeaderBrand } from './brand';
|
2017-11-09 13:27:32 +02:00
|
|
|
export { default as HeaderNav } from './nav';
|