From 2c61fe2cb12c9d128b0c9d42b8296823decee1ed Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Wed, 15 Oct 2025 19:57:22 +0200 Subject: [PATCH] Modal: More fixes for header layout --- .../ProfileRatingModal.module.scss | 4 +-- .../modals/webApp/WebAppModalTabContent.tsx | 4 ++- src/components/ui/Modal.tsx | 34 +++++++++---------- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/components/modals/profileRating/ProfileRatingModal.module.scss b/src/components/modals/profileRating/ProfileRatingModal.module.scss index dd66e486d..6ad392e2e 100644 --- a/src/components/modals/profileRating/ProfileRatingModal.module.scss +++ b/src/components/modals/profileRating/ProfileRatingModal.module.scss @@ -77,9 +77,7 @@ } .ratingProgress { - margin: 0 auto; - margin-top: 5.625rem; - margin-bottom: 1.5rem; + margin: 4.5rem auto 1.5rem; &.withPreview { margin-bottom: 1rem; diff --git a/src/components/modals/webApp/WebAppModalTabContent.tsx b/src/components/modals/webApp/WebAppModalTabContent.tsx index 0ee5a6b8d..15834b4c3 100644 --- a/src/components/modals/webApp/WebAppModalTabContent.tsx +++ b/src/components/modals/webApp/WebAppModalTabContent.tsx @@ -107,6 +107,8 @@ const DEFAULT_BUTTON_TEXT: Record = { close: 'Close', }; +const NBSP = '\u00A0'; + const WebAppModalTabContent: FC = ({ modal, webApp, @@ -1109,7 +1111,7 @@ const WebAppModalTabContent: FC = ({ {popupParameters && ( = ({ dialogRef, title, @@ -147,25 +145,25 @@ const Modal: FC = ({ return header; } - if (!title && !withCloseButton) return undefined; + const closeButton = withCloseButton ? ( + + ) : undefined; - return ( + return title ? (
- {withCloseButton && ( - - )} -
{title || NBSP}
+ {closeButton} +
{title}
- ); + ) : closeButton; } const fullClassName = buildClassName(