Grégoire Delattre 84ccc6e1eb Remove the download button to add clickable badges
BTW, let's create a polochon metadata component
2019-06-25 14:00:48 +02:00

30 lines
880 B
JavaScript

import React from "react"
import PropTypes from "prop-types"
export const PolochonMetadata = (props) => {
if (!props.quality || props.quality === "") {
return null;
}
const badgeStyle = (props.light) ? "light" : "secondary";
const className = `mx-1 badge badge-pill badge-${badgeStyle}`;
return (
<React.Fragment>
<span className={className}>{props.quality}</span>
<span className={className}>{props.container} </span>
<span className={className}>{props.videoCodec}</span>
<span className={className}>{props.audioCodec}</span>
<span className={className}>{props.releaseGroup}</span>
</React.Fragment>
);
}
PolochonMetadata.propTypes = {
light: PropTypes.bool,
quality: PropTypes.string,
container: PropTypes.string,
videoCodec: PropTypes.string,
audioCodec: PropTypes.string,
releaseGroup: PropTypes.string,
};