diff --git a/src/components/UserAvatar/README.md b/src/components/UserAvatar/README.md index 8b79b403bc..17361b72f9 100644 --- a/src/components/UserAvatar/README.md +++ b/src/components/UserAvatar/README.md @@ -4,12 +4,13 @@ Component for displaying user avatar. ### PropTypes -| Name | Type | Required | Default | Description | -| :------------- | :--------------- | :------- | :------ | :--------------------------------------------------------- | -| imgUrl | `string` | | | Link to image | -| fallbackImgUrl | `string` | | | Link to fallback image | -| size | `UserAvatarSize` | | 'm' | Component size. Possible values: `xs`, `s`, `m`, `l`, `xl` | -| srcSet | `string` | | | `srcSet` attribute of the image | -| sizes | `string` | | | `sizes` attribute of the image | -| title | `string` | | | Tooltip text on hover | -| className | `string` | | | Class name | +| Name | Type | Required | Default | Description | +| :------------- | :--------------- | :------- | :------ | :------------------------------------------------------------------------------------------------------ | +| imgUrl | `string` | | | Link to image | +| fallbackImgUrl | `string` | | | Link to fallback image | +| size | `UserAvatarSize` | | 'm' | Component size. Possible values: `xs`, `s`, `m`, `l`, `xl` | +| srcSet | `string` | | | `srcSet` attribute of the image | +| sizes | `string` | | | `sizes` attribute of the image | +| title | `string` | | | Tooltip text on hover | +| className | `string` | | | Class name | +| loading | `eager \| lazy` | | | The loading attribute specifies whether a browser should load an image immediately or to defer loading. | diff --git a/src/components/UserAvatar/UserAvatar.tsx b/src/components/UserAvatar/UserAvatar.tsx index 1a6d406112..66ad3303f9 100644 --- a/src/components/UserAvatar/UserAvatar.tsx +++ b/src/components/UserAvatar/UserAvatar.tsx @@ -15,6 +15,7 @@ export interface UserAvatarProps { sizes?: string; title?: string; className?: string; + loading?: 'eager' | 'lazy'; /** @deprecated Use appropriate component, like `