MM-21062 Added margin to custom Emoji (#3686)

Added margin to custom emoji style to match native emoji.
This commit is contained in:
Mattermost Build 2019-12-10 17:37:04 +01:00 committed by Elias Nahum
parent 9ab6b36e2f
commit d9cd23f68c
2 changed files with 4 additions and 1 deletions

View file

@ -40,6 +40,7 @@ export default class Emoji extends React.PureComponent {
size: PropTypes.number,
textStyle: CustomPropTypes.Style,
unicode: PropTypes.string,
customEmojiStyle: CustomPropTypes.Style,
};
static defaultProps = {
@ -96,6 +97,7 @@ export default class Emoji extends React.PureComponent {
literal,
textStyle,
displayTextOnly,
customEmojiStyle,
} = this.props;
const {imageUrl} = this.state;
@ -143,7 +145,7 @@ export default class Emoji extends React.PureComponent {
return (
<FastImage
key={key}
style={{width, height}}
style={[customEmojiStyle, {width, height}]}
source={{uri: imageUrl}}
onError={this.onError}
/>

View file

@ -49,6 +49,7 @@ export default class Reaction extends PureComponent {
emojiName={emojiName}
size={20}
textStyle={{color: 'black', fontWeight: 'bold'}}
customEmojiStyle={{marginHorizontal: 3}}
padding={5}
/>
<Text style={styles.count}>{count}</Text>