7c36326bff
* 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>
30 lines
631 B
TypeScript
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;
|