fix: 2px misalignment

feat: Improved readability of tabs and subheadings
This commit is contained in:
Tom Moor
2019-07-07 21:40:34 -07:00
parent 091e542406
commit 7db0be0a6a
6 changed files with 45 additions and 24 deletions

View File

@@ -1,16 +1,37 @@
// @flow
import * as React from 'react';
import styled from 'styled-components';
const Subheading = styled.h3`
font-size: 11px;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.04em;
color: ${props => props.theme.textTertiary};
type Props = {
children: React.Node,
};
const H3 = styled.h3`
border-bottom: 1px solid ${props => props.theme.divider};
padding-bottom: 8px;
margin-top: 30px;
margin-bottom: 10px;
margin-top: 22px;
margin-bottom: 12px;
line-height: 1;
`;
const Underline = styled('span')`
position: relative;
top: 1px;
display: inline-block;
font-weight: 500;
font-size: 14px;
line-height: 1.5;
color: ${props => props.theme.textSecondary};
border-bottom: 3px solid ${props => props.theme.textSecondary};
padding-bottom: 5px;
`;
const Subheading = ({ children, ...rest }: Props) => {
return (
<H3 {...rest}>
<Underline>{children}</Underline>
</H3>
);
};
export default Subheading;