-
Notifications
You must be signed in to change notification settings - Fork 750
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Tweak kit for exchange integration (#98)
- Loading branch information
1 parent
59e0b3b
commit 19388c2
Showing
12 changed files
with
41 additions
and
32 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
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export { default as Modal } from "./Modal"; | ||
export { default as ModalProvider } from "./ModalContext"; | ||
export { default as useModal } from "./useModal"; | ||
export type { ModalProps } from "./types"; |
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
export type ModalTheme = { | ||
export interface ModalTheme { | ||
background: string; | ||
}; | ||
} | ||
|
||
export interface ModalProps { | ||
onDismiss: () => void; | ||
} |
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 |
---|---|---|
@@ -1,18 +1,2 @@ | ||
import React from "react"; | ||
import { useModal } from "../Modal"; | ||
import ConnectModal from "./ConnectModal"; | ||
import AccountModal from "./AccountModal"; | ||
import { Login } from "./types"; | ||
|
||
interface ReturnType { | ||
onPresentConnectModal: () => void; | ||
onPresentAccountModal: () => void; | ||
} | ||
|
||
const useWalletModal = (login: Login, logout: () => void, account?: string): ReturnType => { | ||
const [onPresentConnectModal] = useModal(<ConnectModal login={login} />); | ||
const [onPresentAccountModal] = useModal(<AccountModal account={account} logout={logout} />); | ||
return { onPresentConnectModal, onPresentAccountModal }; | ||
}; | ||
|
||
export default useWalletModal; | ||
export { default as useWalletModal } from "./useWalletModal"; | ||
export type { ConnectorId, Login } from "./types"; |
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,18 @@ | ||
import React from "react"; | ||
import { useModal } from "../Modal"; | ||
import ConnectModal from "./ConnectModal"; | ||
import AccountModal from "./AccountModal"; | ||
import { Login } from "./types"; | ||
|
||
interface ReturnType { | ||
onPresentConnectModal: () => void; | ||
onPresentAccountModal: () => void; | ||
} | ||
|
||
const useWalletModal = (login: Login, logout: () => void, account?: string): ReturnType => { | ||
const [onPresentConnectModal] = useModal(<ConnectModal login={login} />); | ||
const [onPresentAccountModal] = useModal(<AccountModal account={account} logout={logout} />); | ||
return { onPresentConnectModal, onPresentAccountModal }; | ||
}; | ||
|
||
export default useWalletModal; |