add no image placeholder
This commit is contained in:
parent
69e3430215
commit
891d8163d2
|
@ -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 (
|
||||||
|
<div className={classes.main}>
|
||||||
|
<div className={classes.icon}>
|
||||||
|
<PhotoIcon />
|
||||||
|
</div>
|
||||||
|
<div className={classes.subText}>No image available</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default withStyles(styles)(NoImage)
|
|
@ -15,6 +15,7 @@ import IconTextField from '../base/IconTextField'
|
||||||
import Icon from '../base/icons/IconByName'
|
import Icon from '../base/icons/IconByName'
|
||||||
import { convertTokenAmountUsd } from '../../utils/prices'
|
import { convertTokenAmountUsd } from '../../utils/prices'
|
||||||
import { setMediaType } from '../../utils/project'
|
import { setMediaType } from '../../utils/project'
|
||||||
|
import NoImage from '../base/NoImage'
|
||||||
|
|
||||||
const { addProject } = LiquidPledging.methods
|
const { addProject } = LiquidPledging.methods
|
||||||
|
|
||||||
|
@ -335,6 +336,7 @@ const SubmissionSection = ({ classes, history }) => {
|
||||||
onBlur={handleBlur}
|
onBlur={handleBlur}
|
||||||
value={values.media || ''}
|
value={values.media || ''}
|
||||||
/>
|
/>
|
||||||
|
<NoImage />
|
||||||
{status && status.showPreview &&
|
{status && status.showPreview &&
|
||||||
<div className={classnames(classes.markdown, fullWidth)}>
|
<div className={classnames(classes.markdown, fullWidth)}>
|
||||||
<div
|
<div
|
||||||
|
|
Loading…
Reference in New Issue