-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlaylist.js
More file actions
25 lines (22 loc) · 893 Bytes
/
Copy pathPlaylist.js
File metadata and controls
25 lines (22 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import React from 'react';
import './Playlist.css';
import { TrackList } from '../TrackList/TrackList';
export class Playlist extends React.Component {
constructor(props) {
super(props);
this.handleNameChange = this.handleNameChange.bind(this);
}
handleNameChange(e) {
this.props.onNameChange(e.target.value);
}
render() {
return (
<div className="Playlist">
<input defaultValue={'New Playlist'} onChange={this.handleNameChange} />
{/* <!-- Add a TrackList component --> */}
<TrackList tracks={this.props.playlistTracks} onRemove={this.props.onRemove} isRemoval={true} onMoveUp={this.props.onMoveUp} onMoveDown={this.props.onMoveDown} />
<button className="Playlist-save" onClick={this.props.onSave}>SAVE TO SPOTIFY</button>
</div>
);
}
}