Skip to content

Commit

Permalink
Merge branch 'dev' into docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wenty22 committed Nov 9, 2023
2 parents 1da32b9 + aaf6846 commit ef217be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/walletkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@totejs/walletkit",
"version": "1.0.0",
"version": "1.0.2",
"type": "module",
"files": [
"dist",
Expand Down
8 changes: 7 additions & 1 deletion website/src/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,19 @@ export default function App() {

## useModal

Use hook `useModal` to show/dismiss the specific modal. Must be used within a `<WalletKitProvider>`.

- `onOpen`: open the connect wallet modal
- `onOpenProfile`: open the connected modal
- `onOpenSwitchNetwork`: open the switch network modal

```tsx live=false
import { useModal } from '@totejs/walletkit';

const { isOpen, onOpen, onClose, onOpenProfile, onOpenSwitchNetwork } = useModal();

<button onClick={onOpen}>Open Connect Modal</button>
<button onClick={onOpenProfile}>Open Profile Modal</button>
<button onClick={onOpenProfile}>Open Connected Modal</button>
<button onClick={onOpenSwitchNetwork}>Open SwitchNetwork Modal</button>
```

Expand Down

0 comments on commit ef217be

Please sign in to comment.