|
@@ -103,6 +103,7 @@ export const PageTitleHeader = (props: Props): JSX.Element => {
|
|
|
|
|
|
|
|
const isInvalid = validationResult != null;
|
|
const isInvalid = validationResult != null;
|
|
|
|
|
|
|
|
|
|
+ // calculate inputMaxWidth as the maximum width of AutoSizeInput minus the width of WIP badge and CopyDropdown
|
|
|
const inputMaxWidth = useMemo(() => {
|
|
const inputMaxWidth = useMemo(() => {
|
|
|
if (maxWidth == null) {
|
|
if (maxWidth == null) {
|
|
|
return undefined;
|
|
return undefined;
|
|
@@ -115,6 +116,7 @@ export const PageTitleHeader = (props: Props): JSX.Element => {
|
|
|
return getAdjustedMaxWidthForAutosizeInput(maxWidth, 'md', validationResult != null ? false : undefined) - wipBadgeAndCopyDropdownWidth;
|
|
return getAdjustedMaxWidthForAutosizeInput(maxWidth, 'md', validationResult != null ? false : undefined) - wipBadgeAndCopyDropdownWidth;
|
|
|
}, [currentPage.wip, maxWidth, validationResult]);
|
|
}, [currentPage.wip, maxWidth, validationResult]);
|
|
|
|
|
|
|
|
|
|
+ // calculate h1MaxWidth as the inputMaxWidth plus padding
|
|
|
const h1MaxWidth = useMemo(() => {
|
|
const h1MaxWidth = useMemo(() => {
|
|
|
if (inputMaxWidth == null) {
|
|
if (inputMaxWidth == null) {
|
|
|
return undefined;
|
|
return undefined;
|