Skip to content

Commit

Permalink
fix: avatar image resize mode on wrong style element (#231)
Browse files Browse the repository at this point in the history
## Short description
This PR moves the resizeMode style attribute from the `View` component
to the `Image` component.

## List of changes proposed in this pull request
- Avatar style attributes

## How to test
Check Avatar rendering.

---------

Co-authored-by: Damiano Plebani <[email protected]>
  • Loading branch information
CrisTofani and dmnplb authored Mar 29, 2024
1 parent 0ba833c commit af2d66b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/avatar/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ const styles = StyleSheet.create({
},
avatarInnerWrapper: {
overflow: "hidden",
resizeMode: "contain",
backgroundColor: IOColors.white,
borderCurve: "continuous"
},
avatarImage: {
resizeMode: "contain",
height: "100%",
width: "100%"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ exports[`Test Avatar Components - Experimental Enabled Avatar Snapshot 1`] = `
"backgroundColor": "#FFFFFF",
"borderCurve": "continuous",
"overflow": "hidden",
"resizeMode": "contain",
},
{
"borderRadius": 2,
Expand All @@ -47,6 +46,7 @@ exports[`Test Avatar Components - Experimental Enabled Avatar Snapshot 1`] = `
style={
{
"height": "100%",
"resizeMode": "contain",
"width": "100%",
}
}
Expand Down Expand Up @@ -83,7 +83,6 @@ exports[`Test Avatar Components Avatar Snapshot 1`] = `
"backgroundColor": "#FFFFFF",
"borderCurve": "continuous",
"overflow": "hidden",
"resizeMode": "contain",
},
{
"borderRadius": 2,
Expand All @@ -102,6 +101,7 @@ exports[`Test Avatar Components Avatar Snapshot 1`] = `
style={
{
"height": "100%",
"resizeMode": "contain",
"width": "100%",
}
}
Expand Down

0 comments on commit af2d66b

Please sign in to comment.