GoScrobble/web/src/Components/TopTableBox.js
Daniel Mason 3f3296e649 0.0.22
- Rework navbar + user pages
2021-04-07 21:34:17 +12:00

32 lines
No EOL
948 B
JavaScript

import React from "react";
import { Link } from 'react-router-dom';
import './TopTableBox.css'
const TopTableBox = (props) => {
let img = 'https://www.foot.com/wp-content/uploads/2017/06/placeholder-square-300x300.jpg';
if (props.img && props.img !== '') {
img = props.img
}
return (
<Link to={"/artist/"+props.uuid} float="left" >
<div
className="topTableBox"
style={{
backgroundImage: `url(${img})`,
backgroundSize: `cover`,
backgroundPosition: `top center`,
width: `${props.size}px`,
height: `${props.size}px`,
float: `left`,
}} >
<div className="topOverlay">
<span className="topText">#{props.number} {props.title}</span>
</div>
</div>
</Link>
);
}
export default TopTableBox;