lbry-desktop/ui/component/common/thumbnail.jsx
2019-11-11 13:27:29 -05:00

28 lines
503 B
JavaScript

// @flow
import React from 'react';
import classnames from 'classnames';
type Props = {
src: string,
shouldObscure: boolean,
className?: string,
};
const Thumbnail = (props: Props) => {
const { className, src, shouldObscure } = props;
return (
<img
alt={__('Image thumbnail')}
className={classnames(
'card__media',
{
'card__media--nsfw': shouldObscure,
},
className
)}
src={src}
/>
);
};
export default Thumbnail;