Skip to content

Commit

Permalink
fix: pass margin and other styles to OptimizedImage background-based …
Browse files Browse the repository at this point in the history
…fallback

Signed-off-by: Norman Meier <[email protected]>
  • Loading branch information
n0izn0iz committed Feb 20, 2024
1 parent ae83fac commit 00ab1af
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions packages/components/OptimizedImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,7 @@ export const OptimizedImage: React.FC<
}, [fallbackURI]);

if ((shouldUseFallback && !fallbackURI) || isFallbackError) {
return (
<View
style={{
width: otherStyle.width,
height: otherStyle.height,
position: otherStyle.position,
top: otherStyle.top,
left: otherStyle.left,
right: otherStyle.right,
bottom: otherStyle.bottom,
borderColor: otherStyle.borderColor,
borderWidth: otherStyle.borderWidth,
borderRadius: otherStyle.borderRadius,
borderTopLeftRadius: otherStyle.borderTopLeftRadius,
borderBottomLeftRadius: otherStyle.borderBottomLeftRadius,
backgroundColor: neutral33,
}}
/>
);
return <View style={[{ backgroundColor: neutral33 }, otherStyle]} />;
}

// imported images are already a valid source object
Expand Down

0 comments on commit 00ab1af

Please sign in to comment.