refactor(component): adjust confirm modal api (#7589)

This commit is contained in:
EYHN
2024-07-24 08:18:33 +00:00
parent 6ca7c41861
commit 98281a6394
28 changed files with 51 additions and 54 deletions

View File

@@ -57,11 +57,11 @@ export const InviteModal = ({
padding: '20px 26px',
},
}}
confirmText={t['Invite']()}
confirmButtonOptions={{
loading: isMutating,
type: 'primary',
['data-testid' as string]: 'confirm-enable-affine-cloud-button',
children: t['Invite'](),
}}
onConfirm={handleConfirm}
>

View File

@@ -38,14 +38,13 @@ export const MemberLimitModal = ({
: 'com.affine.payment.member-limit.pro.description'
]({ planName: plan, quota: quota })}
cancelButtonOptions={{ style: { display: isFreePlan ? '' : 'none' } }}
confirmText={t[
isFreePlan
? 'com.affine.payment.member-limit.free.confirm'
: 'com.affine.payment.member-limit.pro.confirm'
]()}
confirmButtonOptions={{
type: 'primary',
children:
t[
isFreePlan
? 'com.affine.payment.member-limit.free.confirm'
: 'com.affine.payment.member-limit.pro.confirm'
](),
}}
onConfirm={handleConfirm}
></ConfirmModal>