import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router'; import Icons from './Icons'; const Item = ({ isAdded, onSelect, name, url }) => (
  • View
  • ); const ItemType = PropTypes.shape({ name: PropTypes.string.isRequired, url: PropTypes.string.isRequired, isAdded: PropTypes.bool.isRequired, }); Item.propTypes = { ...ItemType, onSelect: PropTypes.func.isRequired, }; const QuickAddList = ({ items, onSelect }) => ( ); QuickAddList.propTypes = { items: PropTypes.arrayOf(ItemType).isRequired, onSelect: PropTypes.func.isRequired, }; export default QuickAddList;