MM-18934 Fix padding on image attachment border (#3466)

* MM-18934 Fix padding on image attachment border

Removed padding from image padding as it was pushing the images outside of the box.

* MM-18934 Add spacing between border and image

Added a margin to progressive image to allow for a spacing with the absolutefill

* MM-18934 Fixed eslint

Fixed eslint issues
This commit is contained in:
CJ 2019-10-31 11:29:08 -04:00 committed by GitHub
parent 8f4d5ad260
commit 42560ca047
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View file

@ -23,7 +23,6 @@ exports[`AttachmentImage it matches snapshot 1`] = `
"borderRadius": 2,
"borderWidth": 1,
"flex": 1,
"padding": 5,
},
Object {
"height": 28,

View file

@ -177,7 +177,6 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => {
borderWidth: 1,
borderRadius: 2,
flex: 1,
padding: 5,
},
};
});

View file

@ -167,7 +167,7 @@ export default class ProgressiveImage extends PureComponent {
resizeMethod={resizeMethod}
onError={onError}
source={{uri}}
style={StyleSheet.absoluteFill}
style={[StyleSheet.absoluteFill, styles.attachmentMargin]}
>
{this.props.children}
</ImageComponent>
@ -189,4 +189,10 @@ const styles = StyleSheet.create({
alignItems: 'center',
justifyContent: 'center',
},
attachmentMargin: {
marginTop: 2.5,
marginLeft: 2.5,
marginBottom: 5,
marginRight: 5,
},
});