From 891d8163d25989d820b4adaa7e5e605b670c6422 Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Fri, 23 Aug 2019 08:38:28 -0400 Subject: [PATCH] add no image placeholder --- src/components/base/NoImage.jsx | 34 +++++++++++++++++++++++ src/components/projects/CreateProject.jsx | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 src/components/base/NoImage.jsx diff --git a/src/components/base/NoImage.jsx b/src/components/base/NoImage.jsx new file mode 100644 index 0000000..15ba53d --- /dev/null +++ b/src/components/base/NoImage.jsx @@ -0,0 +1,34 @@ +import React from 'react' +import { withStyles } from '@material-ui/core/styles' +import PhotoIcon from './icons/Photo.jsx' + +const styles = theme => ({ + theme, + main: { + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + justifyContent: 'center', + background: 'rgba(147, 155, 161, 0.1)', + minHeight: '15em', + gridColumn: '1 / 13' + }, + icon: {}, + subText: { + color: '#939BA1', + fontSize: '0.9375rem' + } +}) + +function NoImage({ classes }){ + return ( +
+
+ +
+
No image available
+
+ ) +} + +export default withStyles(styles)(NoImage) diff --git a/src/components/projects/CreateProject.jsx b/src/components/projects/CreateProject.jsx index 0843e9d..f6e0e00 100644 --- a/src/components/projects/CreateProject.jsx +++ b/src/components/projects/CreateProject.jsx @@ -15,6 +15,7 @@ import IconTextField from '../base/IconTextField' import Icon from '../base/icons/IconByName' import { convertTokenAmountUsd } from '../../utils/prices' import { setMediaType } from '../../utils/project' +import NoImage from '../base/NoImage' const { addProject } = LiquidPledging.methods @@ -335,6 +336,7 @@ const SubmissionSection = ({ classes, history }) => { onBlur={handleBlur} value={values.media || ''} /> + {status && status.showPreview &&