5e21ff1e64
fixes #282 fixes #297 fixes #333 Not only adds icons (as svgs) but also removes the assets folder which adds some side effects: - move fonts to it's own component (currently only exposing libre-franlin) - Base.global requires fonts and injects them - update webpack and babelrc to ignore/include that new folder Having to deal with those side effects, I took the opportunity to add some improvements: - rename "regular" to "normal" which conforms to the font-weight rule options - apply family and weight to buttons (which default to system-ui) - replace all font-weight to use the typography composer - only use "Libra Franklin" as the family name, using weight to vary between files
37 lines
903 B
JavaScript
37 lines
903 B
JavaScript
import styled from 'styled-components';
|
|
import { remcalc } from '../../shared/functions';
|
|
import { colors } from '../../shared/constants';
|
|
import { Baseline } from '../../shared/composers';
|
|
import Button from '../button';
|
|
|
|
const MetricButtonIcon = styled(Button)`
|
|
position: relative;
|
|
display: flex;
|
|
margin: 0;
|
|
padding: ${remcalc(18)} ${remcalc(24)};
|
|
float: right;
|
|
background-color: ${colors.base.primaryDesaturated};
|
|
line-height: 1.5;
|
|
border: none;
|
|
border-left: solid ${remcalc(1)} ${colors.base.primaryDesaturated};
|
|
cursor: pointer;
|
|
top: auto;
|
|
right: auto;
|
|
margin-left: 0 !important;
|
|
min-width: auto;
|
|
|
|
&:hover,
|
|
&:focus,
|
|
&:active,
|
|
&:active:hover,
|
|
&:active:focus {
|
|
background-color: ${colors.base.primaryHover};
|
|
border: none;
|
|
border-left: solid ${remcalc(1)} ${colors.base.primaryDesaturatedHover};
|
|
}
|
|
`;
|
|
|
|
export default Baseline(
|
|
MetricButtonIcon
|
|
);
|