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 children: ReactNode;
|
||||||
readonly isLoading?: boolean;
|
readonly isLoading?: boolean;
|
||||||
readonly buttonTitle?: AdminConsoleKey;
|
readonly buttonTitle?: AdminConsoleKey;
|
||||||
readonly isButtonDisabled?: boolean;
|
readonly isCreateButtonDisabled?: boolean;
|
||||||
readonly onClick: () => void;
|
readonly onClick: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
function AddOnNoticeFooter({ children, isLoading, onClick, isButtonDisabled, buttonTitle }: Props) {
|
function AddOnNoticeFooter({
|
||||||
|
children,
|
||||||
|
isLoading,
|
||||||
|
onClick,
|
||||||
|
isCreateButtonDisabled,
|
||||||
|
buttonTitle,
|
||||||
|
}: Props) {
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<div className={styles.description}>{children}</div>
|
<div className={styles.description}>{children}</div>
|
||||||
|
@ -22,7 +28,7 @@ function AddOnNoticeFooter({ children, isLoading, onClick, isButtonDisabled, but
|
||||||
type="primary"
|
type="primary"
|
||||||
title={buttonTitle ?? 'upsell.upgrade_plan'}
|
title={buttonTitle ?? 'upsell.upgrade_plan'}
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
disabled={isButtonDisabled}
|
disabled={isCreateButtonDisabled}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -165,10 +165,10 @@ function SsoCreationModal({ isOpen, onClose: rawOnClose }: Props) {
|
||||||
!enterpriseSsoUpsellNoticeAcknowledged && (
|
!enterpriseSsoUpsellNoticeAcknowledged && (
|
||||||
<AddOnNoticeFooter
|
<AddOnNoticeFooter
|
||||||
buttonTitle="enterprise_sso.create_modal.create_button_text"
|
buttonTitle="enterprise_sso.create_modal.create_button_text"
|
||||||
isButtonDisabled={isCreateButtonDisabled}
|
isCreateButtonDisabled={isCreateButtonDisabled}
|
||||||
onClick={() => {
|
onClick={async () => {
|
||||||
void update({ enterpriseSsoUpsellNoticeAcknowledged: true });
|
void update({ enterpriseSsoUpsellNoticeAcknowledged: true });
|
||||||
void onSubmit();
|
await onSubmit();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Trans
|
<Trans
|
||||||
|
|
Loading…
Reference in a new issue