interface: indigo-react tabbar

This commit is contained in:
Matilde Park 2020-10-02 17:52:01 -04:00
parent 7164b96c7e
commit 5847ccc32e

View File

@ -1,13 +1,14 @@
import React from 'react'; import React from 'react';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { Box } from '@tlon/indigo-react';
export const TabBar = (props) => { export const TabBar = (props) => {
const { const {
location, location,
settings, settings,
popoutHref
} = props; } = props;
let setColor = '', popout = ''; let setColor = '';
if (location.pathname.includes('/settings')) { if (location.pathname.includes('/settings')) {
setColor = 'black white-d'; setColor = 'black white-d';
@ -15,28 +16,15 @@ export const TabBar = (props) => {
setColor = 'gray3'; setColor = 'gray3';
} }
const hidePopoutIcon = (popout)
? 'dn-m dn-l dn-xl' : 'dib-m dib-l dib-xl';
return ( return (
<div className="dib flex-shrink-0 flex-grow-1"> <Box display='inline-block' flexShrink='0' flexGrow='1'>
<div className={'dib pt2 f9 pl6 pr6 lh-solid'}> <Box display='inline-block' pt='9px' fontSize='0' pl='16px' pr='6'>
<Link <Link
className={'no-underline ' + setColor} className={'no-underline ' + setColor}
to={settings}> to={settings}>
Settings Settings
</Link> </Link>
</div> </Box>
<a href={popoutHref} rel="noopener noreferrer" </Box>
target="_blank"
className="dib fr pr1"
style={{ paddingTop: '8px' }}>
<img
className={'flex-shrink-0 pr3 dn ' + hidePopoutIcon}
src="/~chat/img/popout.png"
height="16"
width="16" />
</a>
</div>
); );
}; };