fix: no feedback on buttons on /getting-started page. (#10152)

* add isLoading type to ButtonProps type

* add loading feedback

* Update apps/web/components/getting-started/components/AppConnectionItem.tsx

Not neeeded as buttonProps.isLoading is false by default :)

---------

Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
This commit is contained in:
Purushottam Khedre 2023-07-14 14:33:11 +05:30 committed by GitHub
parent fb16d8e900
commit 4aaf5da36d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,7 @@ const AppConnectionItem = (props: IAppConnectionItem) => {
color="secondary"
disabled={installed}
type="button"
loading={buttonProps?.isLoading}
onClick={(event) => {
// Save cookie key to return url step
document.cookie = `return-to=${window.location.href};path=/;max-age=3600;SameSite=Lax`;

View File

@ -34,6 +34,7 @@ export const InstallAppButtonWithoutPlanCheck = (
onClick: () => {
mutation.mutate({ type: props.type });
},
isLoading: mutation.isLoading,
})}
</>
);

View File

@ -34,6 +34,7 @@ export interface InstallAppButtonProps {
renderProps: ButtonProps & {
/** Tells that the default render component should be used */
useDefaultComponent?: boolean;
isLoading?: boolean;
}
) => JSX.Element;
onChanged?: () => unknown;