Skip to content

Commit

Permalink
docs: latest (coinbase#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zizzamia authored Jun 15, 2024
1 parent d26378f commit 8740784
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Patch Changes

- fb26571: - **fix**: `SwapAmountInput` now correctly displays text styles. By @kyhyco #581
- **fix**: `SwapAmountInput` now correctly displays text styles. By @kyhyco #581 fb26571

## 0.20.11

Expand Down
8 changes: 7 additions & 1 deletion site/docs/components/SwapComponents.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
'use client';
import { useCallback } from 'react';
import { Swap, SwapAmountInput, SwapButton } from '@coinbase/onchainkit/swap';
import {
Swap,
SwapAmountInput,
SwapButton,
SwapToggleButton,
} from '@coinbase/onchainkit/swap';
import { ConnectAccount } from '@coinbase/onchainkit/wallet';
import { useAccount } from 'wagmi';
import type {
Expand Down Expand Up @@ -72,6 +77,7 @@ export default function SwapComponents() {
token={ETHToken}
type="from"
/>
<SwapToggleButton />
<SwapAmountInput
label="Buy"
swappableTokens={swappableTokens}
Expand Down
7 changes: 4 additions & 3 deletions site/docs/pages/swap/swap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ for initiating the transaction.
## Usage

```tsx [code]
import { Swap, SwapAmountInput, SwapButton } from '@coinbase/onchainkit/swap';
import { Swap, SwapAmountInput, SwapButton, SwapToggleButton } from '@coinbase/onchainkit/swap';

const address = '0x1234567890';

<Swap address={address} onError={onError}>
<SwapAmountInput label="Sell" token={fromToken} type="from" />
<SwapAmountInput label="Buy" token={toToken} type="to" />
<SwapAmountInput label="Sell" swappableTokens={swappableTokens} token={fromToken} type="from" />
<SwapToggleButton />
<SwapAmountInput label="Buy" swappableTokens={swappableTokens} token={toToken} type="to" />
<SwapButton onError={onError} onSubmit={onSubmit} />
</Swap>;
```
Expand Down
2 changes: 1 addition & 1 deletion site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"preview": "vocs preview"
},
"dependencies": {
"@coinbase/onchainkit": "0.20.10",
"@coinbase/onchainkit": "0.20.12",
"@types/react": "latest",
"permissionless": "^0.1.29",
"react": "18",
Expand Down
10 changes: 5 additions & 5 deletions site/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,9 @@ __metadata:
languageName: node
linkType: hard

"@coinbase/onchainkit@npm:0.20.10":
version: 0.20.10
resolution: "@coinbase/onchainkit@npm:0.20.10"
"@coinbase/onchainkit@npm:0.20.12":
version: 0.20.12
resolution: "@coinbase/onchainkit@npm:0.20.12"
dependencies:
"@tanstack/react-query": "npm:^5"
clsx: "npm:^2.1.1"
Expand All @@ -359,7 +359,7 @@ __metadata:
"@xmtp/frames-validator": ^0.6.0
react: ^18
react-dom: ^18
checksum: 5b9dd3ec9a08aff0c9bf6539e94e55bc2e1bfddf18cc5e47ba8c8bbdb366493a2ed8fbe686154366117d45f54c5c170f96e5c27990e44dbe3ad2d5e37c00f25d
checksum: 3b4b052e286fdb9a587edc16191592aa2a939d47416da681b52700a92d2209175331d770e2dfb7adc6a07b443461343401ce6e0cdc5b5088f21feb3ea797afab
languageName: node
linkType: hard

Expand Down Expand Up @@ -7666,7 +7666,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "onchainkit@workspace:."
dependencies:
"@coinbase/onchainkit": "npm:0.20.10"
"@coinbase/onchainkit": "npm:0.20.12"
"@types/react": "npm:latest"
permissionless: "npm:^0.1.29"
react: "npm:18"
Expand Down

0 comments on commit 8740784

Please sign in to comment.