60 lines
1.2 KiB
JavaScript
Raw Normal View History

2019-10-23 15:49:03 +02:00
import styled from 'styled-components';
2019-10-24 14:41:06 +02:00
import colors from '../../assets/styles/colors';
2019-10-23 15:49:03 +02:00
const List = styled.ul`
margin-bottom: 0;
padding-left: 0;
max-height: ${props =>
props.numberOfVisibleItems ? `${props.numberOfVisibleItems * 35}px` : null};
overflow-y: scroll;
2019-10-23 15:49:03 +02:00
li {
position: relative;
margin-bottom: 2px;
&:last-of-type {
margin-bottom: 0;
}
}
a {
display: block;
padding-left: 30px;
height: 34px;
border-radius: 2px;
2019-10-23 15:49:03 +02:00
&::before {
content: '•';
position: absolute;
top: calc(50% - 2px);
left: 15px;
2019-10-23 15:49:03 +02:00
font-weight: bold;
display: block;
width: 0.5em;
height: 0.5em;
color: ${colors.leftMenu.darkGrey};
line-height: 5px;
font-size: 10px;
}
p {
color: ${colors.leftMenu.black};
font-size: 13px;
line-height: 34px;
display: flex;
justify-content: space-between;
2019-10-23 15:49:03 +02:00
margin-bottom: 0;
}
2019-10-24 14:41:06 +02:00
&.active {
background-color: #e9eaeb;
2019-10-24 14:41:06 +02:00
p {
font-weight: 600;
}
&::before {
color: ${colors.leftMenu.black};
}
2019-10-23 15:49:03 +02:00
}
&:hover {
text-decoration: none;
}
}
`;
export default List;