-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created an Info component for track info
- Loading branch information
1 parent
6d292a5
commit 8f63469
Showing
2 changed files
with
86 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { withStyles } from 'material-ui/styles'; | ||
import Paper from 'material-ui/Paper'; | ||
import Typography from 'material-ui/Typography'; | ||
|
||
const styles = theme => ({ | ||
root: theme.mixins.gutters({ | ||
paddingTop: 6, | ||
paddingBottom: 6 | ||
}), | ||
|
||
link: { | ||
'text-decoration': 'none' | ||
} | ||
}); | ||
|
||
const Info = props => { | ||
return ( | ||
<div className={props.classes.root}> | ||
<Typography | ||
type="subheading" | ||
component="a" | ||
href={props.trackUrl} | ||
target="__blank" | ||
className={props.classes.link} | ||
> | ||
{props.trackName} | ||
</Typography> | ||
<Typography | ||
type="body1" | ||
component="a" | ||
href={props.artistUrl} | ||
target="__blank" | ||
className={props.classes.link} | ||
> | ||
{props.artistName} | ||
</Typography> | ||
<Typography | ||
type="caption" | ||
component="a" | ||
href={props.albumUrl} | ||
target="__blank" | ||
className={props.classes.link} | ||
noWrap | ||
> | ||
{props.albumName} | ||
</Typography> | ||
</div> | ||
); | ||
}; | ||
|
||
export default withStyles(styles)(Info); |
This file contains 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