|
|
@ -3,8 +3,9 @@ import { Box } from '@material-ui/core'; |
|
|
|
import { makeStyles } from '@material-ui/core/styles'; |
|
|
|
import { makeStyles } from '@material-ui/core/styles'; |
|
|
|
import IconButton from '@material-ui/core/IconButton'; |
|
|
|
import IconButton from '@material-ui/core/IconButton'; |
|
|
|
import DesktopWindowsIcon from '@material-ui/icons/DesktopWindows'; |
|
|
|
import DesktopWindowsIcon from '@material-ui/icons/DesktopWindows'; |
|
|
|
|
|
|
|
import CropOriginal from '@material-ui/icons/Image'; |
|
|
|
import { Panel } from '../Panels'; |
|
|
|
import { Panel } from '../Panels'; |
|
|
|
import { BLACK, TEXT } from '../../lib/consts/DEFAULT_THEME'; |
|
|
|
import { BLACK, GREY, TEXT } from '../../lib/consts/DEFAULT_THEME'; |
|
|
|
|
|
|
|
|
|
|
|
interface PreviewProps { |
|
|
|
interface PreviewProps { |
|
|
|
setMode: Dispatch<SetStateAction<boolean>>; |
|
|
|
setMode: Dispatch<SetStateAction<boolean>>; |
|
|
@ -12,8 +13,8 @@ interface PreviewProps { |
|
|
|
|
|
|
|
|
|
|
|
const useStyles = makeStyles(() => ({ |
|
|
|
const useStyles = makeStyles(() => ({ |
|
|
|
displayBox: { |
|
|
|
displayBox: { |
|
|
|
paddingTop: '1em', |
|
|
|
padding: 0, |
|
|
|
paddingBottom: 0, |
|
|
|
width: '100%', |
|
|
|
}, |
|
|
|
}, |
|
|
|
fullScreenButton: { |
|
|
|
fullScreenButton: { |
|
|
|
borderRadius: 8, |
|
|
|
borderRadius: 8, |
|
|
@ -23,8 +24,18 @@ const useStyles = makeStyles(() => ({ |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
fullScreenBox: { |
|
|
|
fullScreenBox: { |
|
|
|
paddingLeft: '.7em', |
|
|
|
paddingLeft: '1em', |
|
|
|
paddingRight: 0, |
|
|
|
padding: 0, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
imageButton: { |
|
|
|
|
|
|
|
padding: 0, |
|
|
|
|
|
|
|
color: TEXT, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
imageIcon: { |
|
|
|
|
|
|
|
borderRadius: 8, |
|
|
|
|
|
|
|
padding: 0, |
|
|
|
|
|
|
|
backgroundColor: GREY, |
|
|
|
|
|
|
|
fontSize: '8em', |
|
|
|
}, |
|
|
|
}, |
|
|
|
})); |
|
|
|
})); |
|
|
|
|
|
|
|
|
|
|
@ -34,11 +45,20 @@ const Preview = ({ setMode }: PreviewProps): JSX.Element => { |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Panel> |
|
|
|
<Panel> |
|
|
|
<Box display="flex" className={classes.displayBox}> |
|
|
|
<Box display="flex" className={classes.displayBox}> |
|
|
|
|
|
|
|
<Box> |
|
|
|
|
|
|
|
<IconButton |
|
|
|
|
|
|
|
className={classes.imageButton} |
|
|
|
|
|
|
|
style={{ color: BLACK }} |
|
|
|
|
|
|
|
component="span" |
|
|
|
|
|
|
|
onClick={() => setMode(false)} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<CropOriginal className={classes.imageIcon} /> |
|
|
|
|
|
|
|
</IconButton> |
|
|
|
|
|
|
|
</Box> |
|
|
|
<Box className={classes.fullScreenBox}> |
|
|
|
<Box className={classes.fullScreenBox}> |
|
|
|
<IconButton |
|
|
|
<IconButton |
|
|
|
className={classes.fullScreenButton} |
|
|
|
className={classes.fullScreenButton} |
|
|
|
style={{ color: BLACK }} |
|
|
|
style={{ color: BLACK }} |
|
|
|
aria-label="upload picture" |
|
|
|
|
|
|
|
component="span" |
|
|
|
component="span" |
|
|
|
onClick={() => setMode(false)} |
|
|
|
onClick={() => setMode(false)} |
|
|
|
> |
|
|
|
> |
|
|
|