Skip to content

Commit

Permalink
rename avatarIcons to icons in MultipleAvatars
Browse files Browse the repository at this point in the history
  • Loading branch information
marcochavezf committed Apr 11, 2022
1 parent e16e0ef commit 0967f47
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions src/components/MultipleAvatars.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import CONST from '../CONST';

const propTypes = {
/** Array of avatar URLs or icons */
avatarIcons: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.func])),
icons: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.func])),

/** Set the size of avatars */
size: PropTypes.oneOf(_.values(CONST.AVATAR_SIZE)),
Expand All @@ -26,7 +26,7 @@ const propTypes = {
};

const defaultProps = {
avatarIcons: [],
icons: [],
size: CONST.AVATAR_SIZE.DEFAULT,
secondAvatarStyle: [StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)],
avatarTooltips: [],
Expand All @@ -40,16 +40,16 @@ const MultipleAvatars = (props) => {
...props.secondAvatarStyle,
];

if (!props.avatarIcons.length) {
if (!props.icons.length) {
return null;
}

if (props.avatarIcons.length === 1) {
if (props.icons.length === 1) {
return (
<View style={avatarContainerStyles}>
<Tooltip text={props.avatarTooltips[0]}>
<Avatar
source={props.avatarIcons[0]}
source={props.icons[0]}
size={props.size}
fill={themeColors.iconSuccessFill}
/>
Expand All @@ -65,17 +65,17 @@ const MultipleAvatars = (props) => {
>
<Tooltip text={props.avatarTooltips[0]} absolute>
<Image
source={{uri: props.avatarIcons[0]}}
source={{uri: props.icons[0]}}
style={singleAvatarStyles}
/>
</Tooltip>
<View
style={secondAvatarStyles}
>
{props.avatarIcons.length === 2 ? (
{props.icons.length === 2 ? (
<Tooltip text={props.avatarTooltips[1]} absolute>
<Image
source={{uri: props.avatarIcons[1]}}
source={{uri: props.icons[1]}}
style={singleAvatarStyles}
/>
</Tooltip>
Expand All @@ -88,7 +88,7 @@ const MultipleAvatars = (props) => {
? styles.avatarInnerTextSmall
: styles.avatarInnerText}
>
{`+${props.avatarIcons.length - 1}`}
{`+${props.icons.length - 1}`}
</Text>
</View>
</Tooltip>
Expand Down
2 changes: 1 addition & 1 deletion src/components/OptionRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const OptionRow = (props) => {
/>
) : (
<MultipleAvatars
avatarIcons={props.option.icons}
icons={props.option.icons}
size={props.mode === CONST.OPTION_MODE.COMPACT ? CONST.AVATAR_SIZE.SMALL : CONST.AVATAR_SIZE.DEFAULT}
secondAvatarStyle={[
StyleUtils.getBackgroundAndBorderStyle(props.backgroundColor),
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/IOUPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const IOUPreview = (props) => {
</View>
<View style={styles.iouPreviewBoxAvatar}>
<MultipleAvatars
avatarIcons={[managerAvatar, ownerAvatar]}
icons={[managerAvatar, ownerAvatar]}
secondAvatarStyle={[styles.secondAvatarInline]}
avatarTooltips={avatarTooltip}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/HeaderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const HeaderView = (props) => {
/>
) : (
<MultipleAvatars
avatarIcons={reportIcons}
icons={reportIcons}
avatarTooltips={avatarTooltip}
/>
)}
Expand Down

0 comments on commit 0967f47

Please sign in to comment.