Skip to content

Commit 5cde795

Browse files
committed
docs: render avatar migration table as markdown
1 parent ee36f49 commit 5cde795

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

src/avatar/avatar.mdx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
ColorItem,
44
ColorPalette,
55
Controls,
6+
Markdown,
67
Meta,
78
Subtitle,
89
Title,
@@ -30,14 +31,16 @@ The previous Avatar API accepted `user`, `avatarUrl`, `colorList`, string or
3031
responsive `size` values, and a deprecated `className`. The current API uses
3132
direct identity props instead:
3233

34+
<Markdown>{`
3335
| Legacy prop | Current API |
3436
| ------------------------------ | ------------------------------------------------------------------------ |
35-
| `user.name` | `name` |
36-
| `avatarUrl` | `image` |
37-
| `user.email` | No replacement. Email is no longer used for initials or color selection. |
38-
| `colorList` | Customize the CSS custom properties listed below. |
39-
| `size="l"` or responsive sizes | Pass one supported numeric CSS-pixel `size`. |
40-
| `className` | `exceptionallySetClassName` |
37+
| \`user.name\` | \`name\` |
38+
| \`avatarUrl\` | \`image\` |
39+
| \`user.email\` | No replacement. Email is no longer used for initials or color selection. |
40+
| \`colorList\` | Customize the CSS custom properties listed below. |
41+
| \`size="l"\` or responsive sizes | Pass one supported numeric CSS-pixel \`size\`. |
42+
| \`className\` | \`exceptionallySetClassName\` |
43+
`}</Markdown>
4144

4245
```tsx
4346
<Avatar size={36} name={user.name} image={avatarUrl} exceptionallySetClassName={className} />

0 commit comments

Comments
 (0)