Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const imageSize = fitContentToBounds({
contentSize: props.originalImageSize,
boundsSize: backgroundSize || { width: 0, height: 0 },
mode: 'cover'
});
return (
<div style="{{">
{renderTileWithLayout(tile, {
background: (
<img src="{`//placehold.it/${Math.round(imageSize.width)}x${Math.round(imageSize.height)}`}">
)
})}
</div>
);
};
hideForeground={!props.showForeground}
showForegroundFrame={true}
/>
);
const { foregroundSize = { width: 0, height: 0 } } = getTileLayout(tile);
const imageSize = fitContentToBounds({
contentSize: props.originalImageSize,
boundsSize: foregroundSize,
mode: 'contain'
});
return (
<div>
{renderTileWithLayout(tile, {
foreground: (
<img src="{`//placehold.it/${Math.round(imageSize.width)}x${Math.round(imageSize.height)}`}">
)
})}
</div>
);
};