Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import Item from '../components/Item';
- var PropTypes = React.PropTypes;
- function List(props) {
- var items = props.items;
- return (
- <div>
- <div className="ui middle aligned divided list">
- {items.map(function(item) {
- return <div className="item" key={item.category}>
- <Item item={item} onClickFunction={props.onClickFunction}/>
- </div>
- })}
- </div>
- </div>
- );
- }
- List.propTypes = {
- onClickFunction: PropTypes.func.isRequired,
- items: PropTypes.array.isRequired,
- }
- export default List;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement