File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -56,14 +56,14 @@ export default function AvatarPage() {
5656 < br />
5757
5858 < SpaceBetween direction = "vertical" size = "xxs" >
59- { /* Image with tiny width */ }
59+ { /* Image with tiny width enforce minimum of 28px */ }
6060 < Avatar
6161 ariaLabel = "An awesome picture of Wolverine"
6262 imgUrl = "https://static1.colliderimages.com/wordpress/wp-content/uploads/2024/08/deadpool-wolverine-hugh-jackman-mask-reveal.jpg"
6363 width = { 20 }
6464 />
6565
66- { /* Image with default width */ }
66+ { /* Image with default width of 28px */ }
6767 < Avatar
6868 ariaLabel = "An awesome picture of Wolverine"
6969 imgUrl = "https://static1.colliderimages.com/wordpress/wp-content/uploads/2024/08/deadpool-wolverine-hugh-jackman-mask-reveal.jpg"
@@ -86,10 +86,10 @@ export default function AvatarPage() {
8686 width = { 70 }
8787 />
8888
89- { /* Icon SVG with custom width */ }
89+ { /* Icon SVG with custom width not allowed */ }
9090 < Avatar iconSvg = { customIconSvg } ariaLabel = "Avatar with custom SVG icon" width = { 90 } />
9191
92- { /* Custom width without image should be ignored */ }
92+ { /* Initials with custom width not allowed */ }
9393 < Avatar
9494 color = "gen-ai"
9595 initials = "GW"
@@ -98,7 +98,7 @@ export default function AvatarPage() {
9898 width = { 110 }
9999 />
100100
101- { /* Custom width without image should be ignored */ }
101+ { /* Loading with custom width not allowed */ }
102102 < Avatar
103103 color = "gen-ai"
104104 initials = "GW"
Original file line number Diff line number Diff line change @@ -67,9 +67,9 @@ export interface AvatarProps {
6767 imgUrl ?: string ;
6868
6969 /**
70- * Defines the width of the avatar. Corresponds to the `width` CSS-property .
71- * When this value is set images will be cropped, with `object-fit: cover` centering it .
72- * If no width is provided the avatar will use a default width value.
70+ * Defines the width of the avatar when using a custom image .
71+ * This value corresponds to the `width` CSS-property and will center and crop images using `object-fit: cover`.
72+ * If no width is provided the avatar will use the default width value.
7373 */
7474 width ?: number ;
7575}
You can’t perform that action at this time.
0 commit comments