2017-05-18 21:21:33 +03:00
|
|
|
import React from 'react';
|
2017-05-25 19:32:19 +03:00
|
|
|
import PropTypes from 'prop-types';
|
2017-05-18 21:21:33 +03:00
|
|
|
import { Link } from 'react-router-dom';
|
2017-05-25 15:15:18 +03:00
|
|
|
import { Img } from 'normalized-styled-components';
|
2017-05-18 21:21:33 +03:00
|
|
|
import remcalc from 'remcalc';
|
|
|
|
|
|
|
|
import Logo from '@assets/triton_logo.png';
|
2017-06-07 00:25:49 +03:00
|
|
|
import { Header, HeaderBrand, HeaderItem } from 'joyent-ui-toolkit';
|
2017-05-18 21:21:33 +03:00
|
|
|
|
2017-05-25 17:59:58 +03:00
|
|
|
const StyledLogo = Img.extend`
|
2017-05-18 21:21:33 +03:00
|
|
|
width: ${remcalc(87)};
|
|
|
|
height: ${remcalc(25)};
|
|
|
|
`;
|
|
|
|
|
2017-06-09 07:26:25 +03:00
|
|
|
const NavHeader = ({ datacenter, username }) =>
|
2017-06-06 22:10:04 +03:00
|
|
|
<Header>
|
|
|
|
<HeaderBrand>
|
|
|
|
<Link to="/">
|
|
|
|
<StyledLogo src={Logo} />
|
|
|
|
</Link>
|
|
|
|
</HeaderBrand>
|
|
|
|
<HeaderItem>{datacenter}</HeaderItem>
|
|
|
|
<HeaderItem>{username}</HeaderItem>
|
2017-06-09 07:26:25 +03:00
|
|
|
</Header>;
|
2017-05-25 19:32:19 +03:00
|
|
|
|
2017-06-06 22:10:04 +03:00
|
|
|
NavHeader.propTypes = {
|
2017-05-25 19:32:19 +03:00
|
|
|
datacenter: PropTypes.string,
|
|
|
|
username: PropTypes.string
|
|
|
|
};
|
|
|
|
|
2017-06-06 22:10:04 +03:00
|
|
|
export default NavHeader;
|