Files
Iris/src/js/components/PlaylistGrid.js

31 lines
626 B
JavaScript
Raw Normal View History

2016-10-26 16:55:47 +13:00
import React, { PropTypes } from 'react'
import GridItem from './GridItem'
export default class PlaylistGrid extends React.Component{
constructor(props) {
super(props);
}
render(){
if( this.props.playlists ){
var className = "grid playlist-grid"
if( this.props.className ) className += ' '+this.props.className
return (
<div className={className}>
{
this.props.playlists.map(
(playlist, index) => {
return <GridItem item={playlist} key={index} link={'/playlist/'+playlist.uri} />
}
)
}
</div>
);
}
return null;
}
}