Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2016
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import Item from '../components/Item';
  3. var PropTypes = React.PropTypes;
  4.  
  5.  
  6. function List(props) {
  7.     var items = props.items;
  8.  
  9.     return (
  10.         <div>
  11.             <div className="ui middle aligned divided list">
  12.                 {items.map(function(item) {
  13.                   return <div className="item" key={item.category}>
  14.                         <Item item={item} onClickFunction={props.onClickFunction}/>
  15.                     </div>
  16.                 })}
  17.             </div>
  18.         </div>
  19.     );
  20. }
  21.  
  22. List.propTypes = {
  23.   onClickFunction: PropTypes.func.isRequired,
  24.   items: PropTypes.array.isRequired,
  25. }
  26.  
  27. export default List;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement