Open-source interactive fiction engine, powered by React, Redux and TypeScript. _ https://discoteque.pub/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
458 B

import React, { FC } from 'react';
import * as styles from './Image.styles';
import cn from 'classnames';
type Props = {
src: string | null | undefined;
}
const Image: FC<Props> = ({ src }) => (
<div className={cn([styles.imageContainer, {
[styles.imageContainerVisible]: !!src,
[styles.imageContainerHidden]: !src,
}])}>
{!!src && <div className={''} style={{ backgroundImage: `url('${src}')` }} />}
</div>
);
export default Image;