Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion apps/website/screens/components/avatar/code/AvatarCodePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,22 @@ const sections = [
<td>This function will be called when the user clicks the avatar. Makes it behave as a button.</td>
<td>-</td>
</tr>
<tr>
<td>primaryText</td>
<td>
<TableCode>string</TableCode>
</td>
<td>Text to be displayed as label next to the avatar.</td>
<td>-</td>
</tr>
<tr>
<td>secondaryText</td>
<td>
<TableCode>string</TableCode>
</td>
<td>Text to be displayed as sublabel next to the avatar.</td>
<td>-</td>
</tr>
<tr>
<td>shape</td>
<td>
Expand Down Expand Up @@ -128,7 +144,9 @@ const sections = [
<td>
<TableCode>number</TableCode>
</td>
<td>Value of the tabindex attribute. It will only apply when the onClick property is passed.</td>
<td>
Value of the tabindex attribute. It will only apply when the onClick or linkHref property is passed.
</td>
<td>
<TableCode>0</TableCode>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ const code = `() => {
return (
<DxcInset space="var(--spacing-padding-xl)">
<DxcAvatar
label="John Doe"
label="Michael Ramirez"
color="success"
primaryText="Michael Ramirez"
secondaryText="m.ramirez@insurance.com"
/>
</DxcInset>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/src/avatar/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const DxcAvatar = memo(
shape={shape}
size={size}
status={status}
tabIndex={tabIndex}
tabIndex={onClick || linkHref ? tabIndex : undefined}
title={title}
/>
</LabelWrapper>
Expand Down