Skip to content

Commit d38940b

Browse files
committed
Update Avatar with new prop
1 parent 3bfc09e commit d38940b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

snaps/features/custom-ui/index.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,23 +137,24 @@ await snap.request({
137137
138138
Outputs a [Jazzicon](https://www.npmjs.com/package/@metamask/jazzicon) for an address.
139139
140+
#### Props
141+
142+
- `address`: `string` - A valid [CAIP-10](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-10.md) address.
143+
- `size`: `string` - (Optional) The size of the avatar. Can be `sm`, `md`, or `lg`. Defaults to `md`.
144+
140145
:::note
141146
MetaMask automatically calculates checksums for EVM addresses (`eip155:`).
142147
Addresses for other namespaces are not validated; you should validate them in your Snap.
143148
:::
144149
145-
#### Props
146-
147-
- `address`: `string` - A valid [CAIP-10](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-10.md) address.
148-
149150
#### Example
150151
151152
```js
152153
export const onHomePage: OnHomePageHandler = async () => {
153154
return {
154155
content: (
155156
<Box>
156-
<Avatar address="eip155:1:0x1234567890123456789012345678901234567890" />
157+
<Avatar address="eip155:1:0x1234567890123456789012345678901234567890" size="lg" />
157158
<Avatar address="bip122:000000000019d6689c085ae165831e93:128Lkh3S7CkDTBZ8W7BbpsN3YYizJMp8p6" />
158159
</Box>
159160
),

0 commit comments

Comments
 (0)