Created
May 10, 2018 23:44
-
-
Save cdaz5/4a7f3f3c9244d8f3385e241ad2573e96 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import React, { Component } from 'react'; | |
| import logo from './logo.svg'; | |
| import './track.css'; | |
| class Track extends Component { | |
| constructor(props) { | |
| super(props) | |
| this.addTrack = this.addTrack.bind(this); | |
| } | |
| renderAction() { | |
| if (this.props.isRemoval) { | |
| return <a className="Track-action">-</a> | |
| } | |
| return <a className="Track-action">+</a>; | |
| } | |
| addTrack(event) { | |
| this.props.onAdd(this.props.track); | |
| } | |
| render() { | |
| <div className="Track"> | |
| <div className="Track-information"> | |
| <h3><!-- track name will go here --></h3> | |
| <p><!-- track artist will go here--> | <!-- track album will go here --></p> | |
| </div> | |
| <a className="Track-action"><!-- + or - will go here --></a> | |
| </div> | |
| <TrackList onAdd = {this.props.onAdd} /> | |
| } | |
| } | |
| export default Track; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment