Browse Source

set maxWidth

Yuki Takei 10 months ago
parent
commit
65f787dd66
1 changed files with 4 additions and 0 deletions
  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">