import styled from 'styled-components';
import React from 'react';
import Item from './FatherItem';

const Column = styled.div`
    background:rgba(250,250,250,1);
    height:100%;
    overflow:auto;
`;

export default ({ data, selectCate, selectedCate }) => //data is a map
    <Column>
        {Array.from(data.keys()).map(i => <Item onClick={() => { selectCate(i); }} isSelected={selectedCate === i}>{i}</Item>)}
    </Column>;