Skip to content

Commit 95edb14

Browse files
committed
Add ReportActionAvatars & ReportActionAvatar descriptions
1 parent 8a3d487 commit 95edb14

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/components/ReportActionAvatars/ReportActionAvatar.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,10 @@ function ReportActionAvatarMultipleDiagonal({
543543
);
544544
}
545545

546+
/**
547+
* This component should not be used outside ReportActionAvatars; its sole purpose is to render the ReportActionAvatars UI.
548+
* To render user avatars, use ReportActionAvatars.
549+
*/
546550
export default {
547551
Single: ReportActionAvatarSingle,
548552
Subscript: ReportActionAvatarSubscript,

src/components/ReportActionAvatars/index.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ type ReportActionAvatarsProps = {
5050
subscriptCardFeed?: CompanyCardFeed | typeof CONST.EXPENSIFY_CARD.BANK;
5151
};
5252

53+
/**
54+
* The component that renders proper user avatars based on either:
55+
*
56+
* - accountIDs - if this is passed, it is prioritized and render even if report or action has different avatars attached, useful for option items, menu items etc.
57+
* - action - this is useful when we want to display avatars of chat threads, messages, report/trip previews etc.
58+
* - reportID - this can be passed without above props, when we want to display chat report avatars, DM chat avatars etc.
59+
*
60+
*/
5361
function ReportActionAvatars({
5462
reportID: potentialReportID,
5563
action,

0 commit comments

Comments
 (0)