Skip to content

Commit

Permalink
add key prop to map
Browse files Browse the repository at this point in the history
  • Loading branch information
rohailaltaf committed Dec 9, 2019
1 parent ab4fd1d commit c668ef5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shadows.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Shadow from './shadow'
const shadowTypes = ['left', 'top', 'right', 'bottom']

const Shadows = (props) => {
return shadowTypes.map(shadow => {
return shadowTypes.map((shadow, i) => {
if(!props[shadow]) {
return null
}
Expand All @@ -17,7 +17,7 @@ const Shadows = (props) => {
elevation
}
return (
<Shadow type={shadow} {...shadowProps} />
<Shadow key={`shadow-${i}`} type={shadow} {...shadowProps} />
)
})
}
Expand Down

0 comments on commit c668ef5

Please sign in to comment.