From d65c2298639f7089685035c81123b0cd6cdf578a Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Sat, 17 Jun 2023 04:12:56 +0700 Subject: [PATCH] feat(docs): add useActiveWalletType hook --- docs/docs/hooks/useActiveWalletType.md | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 docs/docs/hooks/useActiveWalletType.md diff --git a/docs/docs/hooks/useActiveWalletType.md b/docs/docs/hooks/useActiveWalletType.md new file mode 100644 index 00000000..38d54057 --- /dev/null +++ b/docs/docs/hooks/useActiveWalletType.md @@ -0,0 +1,34 @@ +# useActiveWalletType + +hook to retrieve current active [`WalletType`](../docs/types/walletType.md) + +#### Usage + +```tsx +import { useActiveWalletType } from "graz"; + +function App() { + const { walletType } = useActiveWalletType(); + + return ( +
+ Connected to {walletType} +
+ ); +} +``` + +#### Return Value + +```tsx +{ + walletType: boolean; + isCosmostation: boolean; + isCosmostationMobile: boolean; + isKeplr: boolean; + isKeplrMobile: boolean; + isLeap: boolean; + isLeapMobile: boolean; + isWalletConnect: boolean; +} +```