madiator.com/ui/component/common/thumbnail.jsx
2021-08-16 12:11:25 +02: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;