Created
January 24, 2018 01:18
-
-
Save matiasfha/769fd32e3b2c68c32224c42b384afdf2 to your computer and use it in GitHub Desktop.
Item functional component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Item = ( { item, handleItemClick, getItemClassName } ) => | |
<div | |
key={item.id} | |
className={getItemClassName(item)} | |
onClick={handleItemClick(item)} | |
> | |
<div className="main">{item.lastName}, {item.firstName}</div> | |
<div className="secondary"> | |
{item.company} | |
<span className="meta"> (hired: {item.hireDate})</span> | |
</div> | |
</div> | |
</div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment