From c62bafd8dd244663ba7d3fcd36f8ba044788a4b7 Mon Sep 17 00:00:00 2001
From: Sodbileg Gansukh
Date: Thu, 19 Dec 2024 23:25:59 +0700
Subject: [PATCH] More improvements
---
.../src/global/form/Form.tsx | 2 +
.../src/global/modal/Modal.tsx | 5 +-
.../email/newsletters/AddNewsletterModal.tsx | 2 +
.../settings/general/InviteUserModal.tsx | 1 -
.../AddRecommendationModal.tsx | 1 +
.../app/components/modal-import-members.hbs | 2 +-
.../app/components/modal-member-tier.hbs | 2 +-
.../modals/confirm-unsaved-changes.hbs | 4 +-
.../app/styles/components/modals-new.css | 90 +++++++++++++++++--
ghost/admin/app/styles/components/modals.css | 6 +-
ghost/admin/app/styles/patterns/buttons.css | 5 +-
11 files changed, 100 insertions(+), 20 deletions(-)
diff --git a/apps/admin-x-design-system/src/global/form/Form.tsx b/apps/admin-x-design-system/src/global/form/Form.tsx
index 9cffe9b912..08b0fd167c 100644
--- a/apps/admin-x-design-system/src/global/form/Form.tsx
+++ b/apps/admin-x-design-system/src/global/form/Form.tsx
@@ -41,6 +41,7 @@ const Form: React.FC = ({
if (marginBottom) {
classes = clsx(
classes,
+ (margins === 'xs' && 'mb-4'),
(margins === 'sm' && 'mb-7'),
(margins === 'md' && 'mb-10'),
(margins === 'lg' && 'mb-12')
@@ -50,6 +51,7 @@ const Form: React.FC = ({
if (marginTop) {
classes = clsx(
classes,
+ (margins === 'xs' && 'mt-4'),
(margins === 'sm' && 'mt-7'),
(margins === 'md' && 'mt-10'),
(margins === 'lg' && 'mt-12')
diff --git a/apps/admin-x-design-system/src/global/modal/Modal.tsx b/apps/admin-x-design-system/src/global/modal/Modal.tsx
index e1cf6b4a59..f98bada492 100644
--- a/apps/admin-x-design-system/src/global/modal/Modal.tsx
+++ b/apps/admin-x-design-system/src/global/modal/Modal.tsx
@@ -156,7 +156,7 @@ const Modal: React.FC = ({
const buttons: ButtonProps[] = [];
- let contentClasses;
+ let contentClasses = '[&_p]:text-pretty';
const removeModal = () => {
confirmIfDirty(dirty, () => {
@@ -196,7 +196,7 @@ const Modal: React.FC = ({
align === 'center' && 'mx-auto',
align === 'left' && 'mr-auto',
align === 'right' && 'ml-auto',
- size !== 'bleed' && 'rounded',
+ size !== 'bleed' && 'rounded-xl',
formSheet ? 'shadow-md' : 'shadow-xl',
(animate && !formSheet && !animationFinished && align === 'center') && 'animate-modal-in',
(animate && !formSheet && !animationFinished && align === 'right') && 'animate-modal-in-from-right',
@@ -342,6 +342,7 @@ const Modal: React.FC = ({
);
contentClasses = clsx(
+ contentClasses,
paddingClasses,
'py-0'
);
diff --git a/apps/admin-x-settings/src/components/settings/email/newsletters/AddNewsletterModal.tsx b/apps/admin-x-settings/src/components/settings/email/newsletters/AddNewsletterModal.tsx
index efc2853fde..0d98f59cee 100644
--- a/apps/admin-x-settings/src/components/settings/email/newsletters/AddNewsletterModal.tsx
+++ b/apps/admin-x-settings/src/components/settings/email/newsletters/AddNewsletterModal.tsx
@@ -83,7 +83,9 @@ const AddNewsletterModal: React.FC = () => {
}}
>