-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
1,467 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React, { useRef } from 'react'; | ||
import useOnClickOutside from '../hooks/use-onclick-outside'; | ||
|
||
interface Props { | ||
isOpen: boolean; | ||
onClose: () => any; | ||
onLightning: any; | ||
onLiquid: any; | ||
} | ||
|
||
const ModalSelectNetwork: React.FC<Props> = ({ isOpen, onClose, onLightning, onLiquid }) => { | ||
const ref = useRef<HTMLDivElement | null>(null); | ||
useOnClickOutside(ref, onClose); | ||
|
||
if (!isOpen) return <></>; | ||
|
||
return ( | ||
<div className="fixed bottom-0 z-50 flex"> | ||
<div className="min-h-60 p-8 m-auto bg-white rounded-t-lg shadow-md" ref={ref}> | ||
<div className="flex flex-col justify-between flex-1"> | ||
<h1 className="mb-4 text-lg">Select network</h1> | ||
<div className="flex justify-center"> | ||
<div className="h-15 p-2 cursor-pointer" onClick={onLiquid}> | ||
<img | ||
className="h-10 mt-0.5 block mx-auto mb-2" | ||
src="assets/images/networks/liquid.svg" | ||
alt="liquid network logo" | ||
/> | ||
<p className="text-xs">Liquid Network</p> | ||
</div> | ||
<div className="h-15 p-2 cursor-pointer" onClick={onLightning}> | ||
<img | ||
className="h-10 mt-0.5 block mx-auto mb-2" | ||
src="assets/images/networks/lightning.svg" | ||
alt="lightning network logo" | ||
/> | ||
<p className="text-xs">Lightning Network</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ModalSelectNetwork; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.