Browse Source

fix: layout header flex

RegMs If 3 years ago
parent
commit
49666154f5
2 changed files with 8 additions and 11 deletions
  1. 6 6
      src/layout/PageLayout.module.css
  2. 2 5
      src/layout/PageLayout.tsx

+ 6 - 6
src/layout/PageLayout.module.css

@@ -1,3 +1,9 @@
+.header {
+  background-color: white;
+  box-shadow: 0px 4px 4px -2px lightgray;
+  z-index: 1;
+}
+
 .arrow {
 .arrow {
   position: absolute;
   position: absolute;
   transition: all 0.3s;
   transition: all 0.3s;
@@ -7,12 +13,6 @@
   opacity: 0;
   opacity: 0;
 }
 }
 
 
-.header {
-  background-color: white;
-  box-shadow: 0px 4px 4px -2px lightgray;
-  z-index: 1;
-}
-
 .title {
 .title {
   font-size: 24px;
   font-size: 24px;
   transition: all 0.3s;
   transition: all 0.3s;

+ 2 - 5
src/layout/PageLayout.tsx

@@ -28,16 +28,13 @@ const PageLayout: React.FC = () => {
   return (
   return (
     <Layout>
     <Layout>
       <Header className={styles.header}>
       <Header className={styles.header}>
-        <Row gutter={8}>
+        <Row justify="space-between">
           <Col className={`${styles.arrow} ${hideArrow ? styles.hide : ''}`}>
           <Col className={`${styles.arrow} ${hideArrow ? styles.hide : ''}`}>
             <Link to={pathname.slice(0, pathname.lastIndexOf('/'))}>
             <Link to={pathname.slice(0, pathname.lastIndexOf('/'))}>
               <Button type="link" icon={<ArrowLeftOutlined />} />
               <Button type="link" icon={<ArrowLeftOutlined />} />
             </Link>
             </Link>
           </Col>
           </Col>
-          <Col
-            className={`${styles.title} ${hideArrow ? '' : styles.margin}`}
-            flex="1"
-          >
+          <Col className={`${styles.title} ${hideArrow ? '' : styles.margin}`}>
             <Text strong>Woord</Text>
             <Text strong>Woord</Text>
           </Col>
           </Col>
           <Col>
           <Col>