Skip to content

Commit d5456bd

Browse files
committed
fix: Update readme
1 parent 034adc9 commit d5456bd

2 files changed

Lines changed: 34 additions & 19 deletions

File tree

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,21 +207,23 @@ import "dme-onboarding-modal/lib/index.css";
207207
### 3. Use the Component in Your React App
208208

209209
```tsx
210-
import { OnboardingModal } from "dme-onboarding-modal";
210+
import { Button } from "dme-onboarding-modal";
211211

212212
function Navbar() {
213213
return (
214214
<nav>
215-
<OnboardingModal
216-
botUsername="MyBot"
217-
walletAddress="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
215+
<Button
216+
modal={{
217+
bot: "MyBot",
218+
address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
219+
}}
218220
/>
219221
</nav>
220222
);
221223
}
222224
```
223225

224-
The wallet address can be obtained from your dApps Web3 provider, such as **MetaMask** or **WalletConnect**.
226+
The wallet address can be obtained from your dApp's Web3 provider, such as **MetaMask** or **WalletConnect**.
225227

226228
## Database
227229

packages/onboarding-modal/README.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ import "dme-onboarding-modal/lib/index.css";
2121
### 2. Use the Component in Your React App
2222

2323
```tsx
24-
import { OnboardingModal } from "dme-onboarding-modal";
24+
import { Button } from "dme-onboarding-modal";
2525

2626
function Navbar() {
2727
return (
2828
<nav>
29-
<OnboardingModal
30-
botUsername="MyBot"
31-
walletAddress="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
29+
<Button
30+
modal={{
31+
bot: "MyBot",
32+
address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
33+
}}
3234
/>
3335
</nav>
3436
);
@@ -40,7 +42,7 @@ function Navbar() {
4042
The wallet address can be obtained from your dApp's Web3 provider, such as **MetaMask** or **WalletConnect**:
4143

4244
```tsx
43-
import { OnboardingModal } from "dme-onboarding-modal";
45+
import { Button } from "dme-onboarding-modal";
4446
import { useAccount } from "wagmi"; // or your Web3 library
4547

4648
function Navbar() {
@@ -49,9 +51,11 @@ function Navbar() {
4951
return (
5052
<nav>
5153
{address && (
52-
<OnboardingModal
53-
botUsername="MyBot"
54-
walletAddress={address}
54+
<Button
55+
modal={{
56+
bot: "MyBot",
57+
address,
58+
}}
5559
/>
5660
)}
5761
</nav>
@@ -63,8 +67,12 @@ function Navbar() {
6367

6468
| Prop | Type | Required | Description |
6569
|------|------|----------|-------------|
66-
| `botUsername` | `string` | Yes | Your Telegram bot's username (without the `@` symbol) |
67-
| `walletAddress` | `string` | Yes | The Ethereum wallet address to link with the user's Telegram account |
70+
| `modal` | `object` | Yes | Configuration object for the modal |
71+
| `modal.bot` | `string` | Yes | Your Telegram bot's username (without the `@` symbol) |
72+
| `modal.address` | `string` | Yes | The Ethereum wallet address to link with the user's Telegram account |
73+
| `modal.title` | `string` | No | Custom modal title (default: "DMe") |
74+
| `modal.description` | `string` | No | Custom modal description |
75+
| `modal.cta` | `string` | No | Custom call-to-action button text (default: "Open Telegram") |
6876

6977
## How It Works
7078

@@ -78,17 +86,22 @@ The modal generates a deep link to your Telegram bot with the wallet address as
7886
## Example
7987

8088
```tsx
81-
import { OnboardingModal } from "dme-onboarding-modal";
89+
import { Button } from "dme-onboarding-modal";
8290
import "dme-onboarding-modal/lib/index.css";
8391

8492
function App() {
8593
return (
8694
<div className="app">
8795
<header>
8896
<h1>My DeFi App</h1>
89-
<OnboardingModal
90-
botUsername="MyDeFiBot"
91-
walletAddress="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
97+
<Button
98+
modal={{
99+
bot: "MyDeFiBot",
100+
address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
101+
title: "Get Notified",
102+
description: "Subscribe to receive important updates about your positions.",
103+
cta: "Subscribe Now",
104+
}}
92105
/>
93106
</header>
94107
</div>

0 commit comments

Comments
 (0)