Small tweaks
This commit is contained in:
parent
068b034a22
commit
45898415a1
|
@ -1,4 +1,5 @@
|
|||
import React from "react";
|
||||
|
||||
import { NetworkProvider } from "./providers/network";
|
||||
import { TransactionsProvider } from "./providers/transactions";
|
||||
import NetworkStatusButton from "./components/NetworkStatusButton";
|
||||
|
@ -37,7 +38,6 @@ function App() {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Overlay show={showModal} onClick={() => setShowModal(false)} />
|
||||
</NetworkProvider>
|
||||
);
|
||||
|
@ -49,9 +49,10 @@ type OverlayProps = {
|
|||
};
|
||||
|
||||
function Overlay({ show, onClick }: OverlayProps) {
|
||||
return show ? (
|
||||
<div className="modal-backdrop fade show" onClick={onClick}></div>
|
||||
) : null;
|
||||
if (show)
|
||||
return <div className="modal-backdrop fade show" onClick={onClick}></div>;
|
||||
|
||||
return <div className="fade"></div>;
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
|
|
@ -16,17 +16,14 @@ type Props = {
|
|||
};
|
||||
|
||||
function NetworkModal({ show, onClose }: Props) {
|
||||
const cancelClose = React.useCallback(e => e.stopPropagation(), []);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`modal fade fixed-right ${show ? "show" : ""}`}
|
||||
tabIndex={-1}
|
||||
className={`modal fade fixed-right${show ? " show" : ""}`}
|
||||
onClick={onClose}
|
||||
>
|
||||
<div className="modal-dialog modal-dialog-vertical">
|
||||
<div className="modal-content">
|
||||
<div className="modal-body" onClick={cancelClose}>
|
||||
<div className="modal-body" onClick={e => e.stopPropagation()}>
|
||||
<span className="close" onClick={onClose}>
|
||||
×
|
||||
</span>
|
||||
|
|
Loading…
Reference in New Issue