1
0
mirror of https://github.com/yldio/copilot.git synced 2025-01-09 02:20:11 +02:00
copilot/packages/ui-toolkit/src/list/li.js
2017-06-15 17:11:40 +01:00

35 lines
673 B
JavaScript

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
*/
const Li = ({ children, ...rest }) =>
<StyledLi {...rest}>
{children}
</StyledLi>;
export default Baseline(Li);