Created
February 13, 2020 02:09
-
-
Save alexandreservian/a3fafa8a8c98ff6eb9a3d0ef3196b387 to your computer and use it in GitHub Desktop.
Personalização das Células da tabela
This file contains 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 Cell = ({ className, cellData, column }) => { | |
const { dataKey } = column; | |
switch(dataKey){ | |
case 'thumbnail': | |
return <Thumbnail src={cellData} /> | |
case 'type': | |
return <Types types={cellData} /> | |
default: | |
return <div className={className}>{cellData}</div>; | |
} | |
} | |
export default { | |
TableCell: Cell, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment