2017-05-18 21:21:33 +03:00
|
|
|
import React from 'react';
|
|
|
|
import styled from 'styled-components';
|
|
|
|
import remcalc from 'remcalc';
|
|
|
|
import Baseline from '../baseline';
|
|
|
|
|
|
|
|
const StyledLi = styled.li`
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
& + & {
|
|
|
|
margin-left: ${remcalc(24)};
|
|
|
|
}
|
|
|
|
|
|
|
|
& a {
|
|
|
|
color: ${props => props.theme.text};
|
|
|
|
text-decoration: none;
|
|
|
|
padding-bottom: ${remcalc(6)};
|
|
|
|
|
|
|
|
&.active {
|
|
|
|
cursor: default;
|
|
|
|
color: ${props => props.theme.primary};
|
|
|
|
border-bottom: ${remcalc(2)} solid ${props => props.theme.primary};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @example ./usage.md
|
|
|
|
*/
|
2017-06-12 01:58:22 +03:00
|
|
|
const Li = ({ children, ...rest }) =>
|
2017-05-18 21:21:33 +03:00
|
|
|
<StyledLi {...rest}>
|
|
|
|
{children}
|
2017-06-12 01:58:22 +03:00
|
|
|
</StyledLi>;
|
2017-05-18 21:21:33 +03:00
|
|
|
|
|
|
|
export default Baseline(Li);
|