joyent-portal/packages/ui-toolkit/src/header/index.js

40 lines
968 B
JavaScript
Raw Normal View History

import React from 'react';
import styled from 'styled-components';
import remcalc from 'remcalc';
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)};
`;
const Header = styled.div`
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-content: stretch;
align-items: stretch;
background-color: ${props => props.theme.brandBackground};
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 }) => (
<Header {...rest}>
2017-11-16 13:48:20 +02:00
<Container fluid={fluid}>{children}</Container>
</Header>
);
export { default as HeaderItem, Anchor as HeaderAnchor } from './item';
export { default as HeaderBrand } from './brand';
export { default as HeaderNav } from './nav';