lbry-desktop/ui/component/common/thumbnail.jsx

29 lines
503 B
React
Raw Normal View History

2018-03-26 23:32:43 +02:00
// @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;