wallet-connect-web-examples/advanced/dapps/react-dapp-v2/src/modals/LoaderModal.tsx
Gancho Radkov 7c36326bff
feat: loading indicators (#402)
* feat: adds loading indicators on all modals

* feat: implements modal loader for session propose

* feat: implements loaders for each separate button

* feat: adds loaders on disconnect & when proposing session on known pairing topic

* refactor: restructure modal properties to avoid conditional hooks

---------

Co-authored-by: Gancho Radkov <ganchoradkov@gmail.com>
2024-01-11 16:03:35 +02:00

30 lines
631 B
TypeScript

import * as React from "react";
import Loader from "../components/Loader";
import { SContainer } from "../components/shared";
import { SModalContainer, SModalParagraph, SModalTitle } from "./shared";
interface LoaderModal {
title: string;
text?: string;
}
const LoaderModal = (props: LoaderModal) => {
const { title, text } = props;
return (
<>
<SModalContainer>
<SModalTitle>{title}</SModalTitle>
<SContainer>
<Loader />
<br />
<SModalParagraph>{text}</SModalParagraph>
</SContainer>
</SModalContainer>
</>
);
};
export default LoaderModal;