Просмотр исходного кода

Merge pull request #9930 from weseek/fix/page-path-header-max-width-for-editor

fix: PagePathHeader maxWidth for editor
Yuki Takei 10 месяцев назад
Родитель
Сommit
67de92f9cf
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      apps/app/src/client/components/PageHeader/PagePathHeader.tsx

+ 4 - 0
apps/app/src/client/components/PageHeader/PagePathHeader.tsx

@@ -108,6 +108,9 @@ export const PagePathHeader = memo((props: Props): JSX.Element => {
 
   const isInvalid = validationResult != null;
 
+  const fixedMaxWidth = maxWidth != null
+    ? maxWidth - 60 // 60px is the width of the buttons
+    : undefined;
   const inputMaxWidth = maxWidth != null
     ? getAdjustedMaxWidthForAutosizeInput(maxWidth, 'sm', validationResult != null ? false : undefined) - 16
     : undefined;
@@ -121,6 +124,7 @@ export const PagePathHeader = memo((props: Props): JSX.Element => {
     >
       <div
         className="page-path-header-input d-inline-block"
+        style={{ maxWidth: fixedMaxWidth }}
       >
         { isRenameInputShown && (
           <div className="position-relative">