2017-06-07 02:23:23 +03:00
|
|
|
import React from 'react';
|
|
|
|
import styled from 'styled-components';
|
2017-09-20 12:30:53 +03:00
|
|
|
import remcalc from 'remcalc';
|
2017-06-07 02:23:23 +03:00
|
|
|
|
|
|
|
import Baseline from '../baseline';
|
|
|
|
|
|
|
|
const UnorderedList = styled.ul`
|
2018-02-26 14:07:30 +02:00
|
|
|
background: ${props => props.theme.disabled};
|
2017-06-07 02:23:23 +03:00
|
|
|
list-style-type: none;
|
2018-02-26 15:47:52 +02:00
|
|
|
padding: ${remcalc(13)} ${remcalc(0)};
|
2017-09-20 12:30:53 +03:00
|
|
|
margin: ${remcalc(18)} 0 0 0;
|
2018-03-21 19:35:51 +02:00
|
|
|
max-height: ${remcalc(50)};
|
2018-02-27 15:24:36 +02:00
|
|
|
overflow-x: auto;
|
|
|
|
overflow-y: hidden;
|
2018-02-26 14:07:30 +02:00
|
|
|
box-sizing: border-box;
|
2018-02-26 15:47:52 +02:00
|
|
|
display: inline-flex;
|
2018-02-26 14:07:30 +02:00
|
|
|
position: relative;
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
width: 100%;
|
|
|
|
height: ${remcalc(1)};
|
|
|
|
background: ${props => props.theme.grey};
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
z-index: 1;
|
|
|
|
}
|
2017-06-07 02:23:23 +03:00
|
|
|
`;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @example ./usage.md
|
|
|
|
*/
|
2018-02-26 14:07:30 +02:00
|
|
|
const SectionList = ({ children, mode, ...rest }) => (
|
2017-08-28 22:21:08 +03:00
|
|
|
<UnorderedList {...rest}>{children}</UnorderedList>
|
|
|
|
);
|
2017-06-07 02:23:23 +03:00
|
|
|
|
|
|
|
export default Baseline(SectionList);
|
|
|
|
|
2017-11-23 14:18:38 +02:00
|
|
|
export { default as Item, Anchor } from './item';
|