This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
outline/app/components/Tab.js
Tom Moor 7db0be0a6a fix: 2px misalignment
feat: Improved readability of tabs and subheadings
2019-07-07 21:40:34 -07:00

35 lines
807 B
JavaScript

// @flow
import * as React from 'react';
import styled, { withTheme } from 'styled-components';
import { NavLink } from 'react-router-dom';
const StyledNavLink = styled(NavLink)`
position: relative;
top: 1px;
display: inline-block;
font-weight: 500;
font-size: 14px;
color: ${props => props.theme.textTertiary};
margin-right: 24px;
padding-bottom: 8px;
&:hover {
color: ${props => props.theme.textSecondary};
border-bottom: 3px solid ${props => props.theme.divider};
padding-bottom: 5px;
}
`;
function Tab(props: *) {
const activeStyle = {
paddingBottom: '5px',
borderBottom: `3px solid ${props.theme.textSecondary}`,
color: props.theme.textSecondary,
};
return <StyledNavLink {...props} activeStyle={activeStyle} />;
}
export default withTheme(Tab);