Files
Iris/src/js/components/PlaylistGrid.js
2016-11-08 13:36:13 +13:00

30 lines
606 B
JavaScript
Executable File

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 ) return null
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>
);
}
}