import React from 'react';
import { Modal } from 'antd';
import Filter from '../common/filterBox/filter2';
import './filterList.less'

const FilterList = ({ visible, onCancel, filters, changeFilterValue }) => {
    return <Modal
        className='filterlist'
        footer={null}
        visible={visible}
        onCancel={onCancel}
        maskClosable={true}
        destroyOnClose={true}
    >
        {filters.map(f => <Filter
            vertical={true}
            key={f.key}
            filter={f}
            changeFilterValue={changeFilterValue}
        />)}
    </Modal>
}

export default FilterList;