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
Copy file name to clipboardExpand all lines: .cursorrules
+37-2Lines changed: 37 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -265,7 +265,7 @@ import { Balance } from "~~/components/scaffold-stark";
265
265
<description>
266
266
Show a blockie (bar code profile icon) component for a given Starknet address.
267
267
268
-
The autogenerated blockie can be manually replaced by another image that we pass through the `ensImage` prop.
268
+
If a Starknet ID profile picture is available, prefer rendering that image in the parent and fallback to `BlockieAvatar` otherwise. `BlockieAvatar` itself always renders a blo-generated identicon for the provided address.
269
269
270
270
If you want more control over styling the blockie, you can directly use blo (pre-installed in Scaffold-Stark 2) and internally used by `BlockieAvatar` component to get the image URL.
271
271
</description>
@@ -294,10 +294,45 @@ import { BlockieAvatar } from "~~/components/scaffold-stark";
294
294
|------|------|---------------|-------------|
295
295
| `address` | `string` | `undefined` | The address for which you want to display its blockie. Ensure it's in the `0x___` format. |
296
296
| `size` | `number` | `undefined` | Width and Height in pixels (square). |
297
-
| `ensImage` (optional) | `string` | `undefined` | An arbitrary image url to render instead of the blockie. |
298
297
</props>
299
298
</blockie_avatar_component>
300
299
300
+
<avatar_component>
301
+
302
+
<description>
303
+
Reusable avatar component that renders a Starknet ID profile picture when provided; otherwise falls back to a blo-generated blockie for the given address.
304
+
</description>
305
+
306
+
<import_statement>
307
+
308
+
```tsx
309
+
import { Avatar } from "~~/components/scaffold-stark";
Show a blockie (bar code profile icon) component for a given Starknet address.
206
206
207
-
The autogenerated blockie can be manually replaced by another image that we pass through the `ensImage` prop.
207
+
If a Starknet ID profile picture is available, prefer rendering that image in the parent and fallback to `BlockieAvatar` otherwise. `BlockieAvatar` itself always renders a blo-generated identicon for the provided address.
208
208
209
209
If you want more control over styling the blockie, you can directly use [blo](https://github.com/bpierre/blo) (pre-installed in Scaffold-Stark 2) and internally used by `BlockieAvatar` component to get the image URL.
210
210
@@ -225,11 +225,39 @@ import { BlockieAvatar } from "~~/components/scaffold-stark";
|`address`|`string`|`undefined`| The address for which you want to display its blockie. Ensure it's in the `0x___` format. |
231
+
|`size`|`number`|`undefined`| Width and Height in pixels (square). |
232
+
233
+
### Avatar
234
+
235
+
Reusable avatar component that renders a Starknet ID profile picture when provided; otherwise falls back to a blo-generated blockie for the given address.
Show a blockie (bar code profile icon) component for a given Starknet address.
206
206
207
-
The autogenerated blockie can be manually replaced by another image that we pass through the `ensImage` prop.
207
+
If a Starknet ID profile picture is available, prefer rendering that image in the parent and fallback to `BlockieAvatar` otherwise. `BlockieAvatar` itself always renders a blo-generated identicon for the provided address.
208
208
209
209
If you want more control over styling the blockie, you can directly use [blo](https://github.com/bpierre/blo) (pre-installed in Scaffold-Stark 2) and internally used by `BlockieAvatar` component to get the image URL.
210
210
@@ -225,11 +225,39 @@ import { BlockieAvatar } from "~~/components/scaffold-stark";
|`address`|`string`|`undefined`| The address for which you want to display its blockie. Ensure it's in the `0x___` format. |
231
+
|`size`|`number`|`undefined`| Width and Height in pixels (square). |
232
+
233
+
### Avatar
234
+
235
+
Reusable avatar component that renders a Starknet ID profile picture when provided; otherwise falls back to a blo-generated blockie for the given address.
0 commit comments