You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 23, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/components/Balance.md
+29-1Lines changed: 29 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,13 @@ sidebar_position: 2
4
4
5
5
# Balance
6
6
7
-
Displays the balance of a given address in both ether (ETH) and US dollars (USD).
7
+
The `Balance` component displays the balance of a given Ethereum (ETH) or Starknet (STRK) address in both its native currency and US dollars (USD). It allows toggling between these two modes and also handles potential errors or loading states.
8
+
9
+
## Features
10
+
11
+
-**ETH & STRK Balances:** Shows both Ethereum and Starknet balances for a given address.
12
+
-**USD Conversion:** Option to toggle and display balance in USD, provided the exchange rates are available.
|**address**|`string`|`undefined`| Address in `0x___` format, it will resolve its Starknet Domain if it has one associated(coming soon). |
28
34
|**className** (optional) |`string`|`""`| Prop to pass additional CSS styling to the component. You can use Tailwind / daisyUI classes like `text-3xl` for styling. |
35
+
|**usdMode** (optional) |`boolean`|`false`| If true, the balance is displayed in USD. Otherwise, it defaults to ETH/STRK. |
36
+
37
+
38
+
## Example
39
+
40
+
The `Balance` component can be easily customized using Tailwind or daisyUI classes. Here’s a more detailed example of its usage:
0 commit comments