Skip to content

Commit 3bfc09e

Browse files
committed
Add props for Address and update children for Text
1 parent 057ad2f commit 3bfc09e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

snaps/features/custom-ui/index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,16 @@ The following custom UI components are available:
6666
Outputs a formatted text field for a blockchain address.
6767
The address is automatically displayed with a [Jazzicon](https://www.npmjs.com/package/@metamask/jazzicon)
6868
and truncated value.
69-
Hovering over the address shows the full value in a tooltip.
69+
When the address is truncated, hovering over the address shows the full value in a tooltip.
7070

7171
#### Props
7272

7373
- `address`: `string` - A valid Ethereum address, starting with `0x`, or a valid
7474
[CAIP-10](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-10.md) address.
75+
- `truncate`: `boolean` - (Optional) whether to truncate the address. Defaults to `true`.
76+
- `displayName`: `boolean` - (Optional) whether to display the internally saved account label in place of the address.
77+
Defaults to `true`.
78+
- `avatar`: `boolean` - (Optional) whether to show the address Jazzicon. Defaults to `true`.
7579

7680
#### Example
7781

@@ -1238,6 +1242,8 @@ Outputs text.
12381242
- `alignment` - (Optional) The alignment of the text.
12391243
Possible values are `"start"`, `"center"`, and `"end"`.
12401244
The default is `"start"`.
1245+
- `children` - The content to display.
1246+
This can include strings, [`Bold`](#bold), [`Italic`](#italic), [`Icon`](#icon), [`Link`](#link), and [`Skeleton`](#skeleton) components.
12411247

12421248

12431249
#### Example

0 commit comments

Comments
 (0)