From cc9c17a86cefd0460ccba7aeda7c0b57efe0ccb1 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Thu, 8 Oct 2020 13:28:24 +0300
Subject: feat: stick all headers to same logic

---
 src/components/ModalScreen/ModalScreen.tsx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'src/components/ModalScreen/ModalScreen.tsx')

diff --git a/src/components/ModalScreen/ModalScreen.tsx b/src/components/ModalScreen/ModalScreen.tsx
index c6044af..4a4b1be 100644
--- a/src/components/ModalScreen/ModalScreen.tsx
+++ b/src/components/ModalScreen/ModalScreen.tsx
@@ -28,6 +28,7 @@ const useStyles = makeStyles(theme => ({
   },
   toolbar: {
     display: 'flex',
+    justifyContent: 'space-between'
   }
 }));
 
@@ -35,7 +36,7 @@ const Transition = React.forwardRef(function Transition(
   props: TransitionProps & { children?: React.ReactElement<any, any> },
   ref: React.Ref<unknown>,
 ) {
-  return <Slide direction="up" ref={ref} {...props} />;
+  return <Slide direction="left" ref={ref} {...props} />;
 });
 
 const ModalScreen: React.FC<PropTypes> = ({ title, children }) => {
@@ -59,12 +60,15 @@ const ModalScreen: React.FC<PropTypes> = ({ title, children }) => {
     >
       <AppBar position="static">
         <Toolbar className={classes.toolbar}>
-          <IconButton edge="start" onClick={handleClose}>
+          <IconButton onClick={handleClose}>
             <CloseIcon />
           </IconButton>
           <Typography variant="h6">
             { title }
           </Typography>
+          <IconButton style={{ opacity: 0, pointerEvents: 'none' }}>
+            <CloseIcon />
+          </IconButton>
         </Toolbar>
       </AppBar>
       <Divider />
-- 
cgit v1.2.3

