You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
938 B
44 lines
938 B
import _ from 'lodash';
|
|
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import { kinds, sizes } from 'Helpers/Props';
|
|
import Label from './Label';
|
|
import styles from './ImportListList.css';
|
|
|
|
function ImportListList({ lists, importListList }) {
|
|
return (
|
|
<div className={styles.lists}>
|
|
{
|
|
lists.map((t) => {
|
|
const list = _.find(importListList, { id: t });
|
|
|
|
if (!list) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Label
|
|
key={list.id}
|
|
kind={kinds.INFO}
|
|
size={sizes.MEDIUM}
|
|
>
|
|
{list.name}
|
|
</Label>
|
|
);
|
|
})
|
|
}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
ImportListList.propTypes = {
|
|
lists: PropTypes.arrayOf(PropTypes.number).isRequired,
|
|
importListList: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
};
|
|
|
|
ImportListList.defaultProps = {
|
|
lists: []
|
|
};
|
|
|
|
export default ImportListList;
|