Shun Miyazawa 2 лет назад
Родитель
Сommit
dfa75aff65

+ 1 - 1
apps/app/src/components/PageHeader/PageHeader.tsx

@@ -16,7 +16,7 @@ export const PageHeader: FC = () => {
   }
   }
 
 
   return (
   return (
-    <nav className={`${styles['page-header']} `}>
+    <nav className={`${styles['page-header']}`}>
       <PagePathHeader
       <PagePathHeader
         currentPage={currentPage}
         currentPage={currentPage}
       />
       />

+ 39 - 42
apps/app/src/components/PageHeader/PagePathHeader.tsx

@@ -87,50 +87,47 @@ export const PagePathHeader: FC<Props> = (props) => {
   return (
   return (
     <div
     <div
       id="page-path-header"
       id="page-path-header"
+      className="d-flex align-items-center"
       onMouseLeave={() => setButtonShown(false)}
       onMouseLeave={() => setButtonShown(false)}
+      onMouseEnter={() => setButtonShown(true)}
     >
     >
-      <div
-        className="d-flex align-items-center"
-        onMouseEnter={() => setButtonShown(true)}
-      >
-        {isRenameInputShown
-          ? (
-            <div className="page-path-header-input me-2">
-              <ClosableTextInput
-                useAutosizeInput
-                value={editedPagePath}
-                placeholder={t('Input page name')}
-                onPressEnter={onPressEnter}
-                onPressEscape={onPressEscape}
-                onChange={onInputChange}
-                validationTarget={ValidationTarget.PAGE}
-              />
-            </div>
-          )
-          : (
-            <div className="me-2">
-              <PagePathHierarchicalLink linkedPagePath={linkedPagePath} />
-            </div>
-          )
-        }
-
-        <div className={`page-path-header-buttons d-flex align-items-center ${isButtonsShown ? '' : 'd-none'}`}>
-          <button
-            type="button"
-            className="btn btn-sm text-muted border border-secondary me-2 d-flex align-items-center justify-content-center"
-            onClick={onClickEditButton}
-          >
-            <span className="material-symbols-outlined fs-5 mt-1">{isRenameInputShown ? 'check_circle' : 'edit'}</span>
-          </button>
-
-          <button
-            type="button"
-            className="btn btn-sm text-muted border border-secondary d-flex align-items-center justify-content-center"
-            onClick={openPageSelectModal}
-          >
-            <span className="material-symbols-outlined fs-5 mt-1">account_tree</span>
-          </button>
-        </div>
+      {isRenameInputShown
+        ? (
+          <div className="page-path-header-input me-2">
+            <ClosableTextInput
+              useAutosizeInput
+              value={editedPagePath}
+              placeholder={t('Input page name')}
+              onPressEnter={onPressEnter}
+              onPressEscape={onPressEscape}
+              onChange={onInputChange}
+              validationTarget={ValidationTarget.PAGE}
+            />
+          </div>
+        )
+        : (
+          <div className="me-2">
+            <PagePathHierarchicalLink linkedPagePath={linkedPagePath} />
+          </div>
+        )
+      }
+
+      <div className={`page-path-header-buttons d-flex align-items-center ${isButtonsShown ? '' : 'd-none'}`}>
+        <button
+          type="button"
+          className="btn btn-sm text-muted border border-secondary me-2 d-flex align-items-center justify-content-center"
+          onClick={onClickEditButton}
+        >
+          <span className="material-symbols-outlined fs-5 mt-1">{isRenameInputShown ? 'check_circle' : 'edit'}</span>
+        </button>
+
+        <button
+          type="button"
+          className="btn btn-sm text-muted border border-secondary d-flex align-items-center justify-content-center"
+          onClick={openPageSelectModal}
+        >
+          <span className="material-symbols-outlined fs-5 mt-1">account_tree</span>
+        </button>
       </div>
       </div>
 
 
       {isOpened
       {isOpened

+ 2 - 2
apps/app/src/components/PageHeader/PageTitleHeader.tsx

@@ -61,7 +61,7 @@ export const PageTitleHeader: FC<Props> = (props) => {
 
 
 
 
   return (
   return (
-    <>
+    <div className="d-flex">
       {isRenameInputShown
       {isRenameInputShown
         ? (
         ? (
           <div className="page-title-header-input">
           <div className="page-title-header-input">
@@ -81,6 +81,6 @@ export const PageTitleHeader: FC<Props> = (props) => {
             {pageTitle}
             {pageTitle}
           </h2>
           </h2>
         )}
         )}
-    </>
+    </div>
   );
   );
 };
 };