mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
chore: fix add on notice footer
This commit is contained in:
parent
e9e5b057e8
commit
c0ca5b427c
2 changed files with 12 additions and 6 deletions
|
@ -9,11 +9,17 @@ type Props = {
|
|||
readonly children: ReactNode;
|
||||
readonly isLoading?: boolean;
|
||||
readonly buttonTitle?: AdminConsoleKey;
|
||||
readonly isButtonDisabled?: boolean;
|
||||
readonly isCreateButtonDisabled?: boolean;
|
||||
readonly onClick: () => void;
|
||||
};
|
||||
|
||||
function AddOnNoticeFooter({ children, isLoading, onClick, isButtonDisabled, buttonTitle }: Props) {
|
||||
function AddOnNoticeFooter({
|
||||
children,
|
||||
isLoading,
|
||||
onClick,
|
||||
isCreateButtonDisabled,
|
||||
buttonTitle,
|
||||
}: Props) {
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.description}>{children}</div>
|
||||
|
@ -22,7 +28,7 @@ function AddOnNoticeFooter({ children, isLoading, onClick, isButtonDisabled, but
|
|||
type="primary"
|
||||
title={buttonTitle ?? 'upsell.upgrade_plan'}
|
||||
isLoading={isLoading}
|
||||
disabled={isButtonDisabled}
|
||||
disabled={isCreateButtonDisabled}
|
||||
onClick={onClick}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -165,10 +165,10 @@ function SsoCreationModal({ isOpen, onClose: rawOnClose }: Props) {
|
|||
!enterpriseSsoUpsellNoticeAcknowledged && (
|
||||
<AddOnNoticeFooter
|
||||
buttonTitle="enterprise_sso.create_modal.create_button_text"
|
||||
isButtonDisabled={isCreateButtonDisabled}
|
||||
onClick={() => {
|
||||
isCreateButtonDisabled={isCreateButtonDisabled}
|
||||
onClick={async () => {
|
||||
void update({ enterpriseSsoUpsellNoticeAcknowledged: true });
|
||||
void onSubmit();
|
||||
await onSubmit();
|
||||
}}
|
||||
>
|
||||
<Trans
|
||||
|
|
Loading…
Reference in a new issue