30 lines
880 B
JavaScript
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,
|
|
};
|
|
|