From a0841e0ef1971e406defc9e04618179c5c8e89c2 Mon Sep 17 00:00:00 2001 From: Andre Vasconcelos Date: Fri, 15 May 2020 11:10:15 +0900 Subject: [PATCH] MM-24497 Ensuring quick reactions render within safe area (#4235) * Ensuring quick reactions render within safe area * Added modifier to align paddings * Updating snapshots --- .../reaction_picker.test.js.snap | 44 +++++++++++-------- app/components/reaction_picker/index.js | 3 +- .../reaction_picker/reaction_picker.js | 15 +++++-- 3 files changed, 40 insertions(+), 22 deletions(-) diff --git a/app/components/reaction_picker/__snapshots__/reaction_picker.test.js.snap b/app/components/reaction_picker/__snapshots__/reaction_picker.test.js.snap index c81fd78e8..d538515ae 100644 --- a/app/components/reaction_picker/__snapshots__/reaction_picker.test.js.snap +++ b/app/components/reaction_picker/__snapshots__/reaction_picker.test.js.snap @@ -3,15 +3,19 @@ exports[`Reactions Should match snapshot with default emojis 1`] = ` { @@ -40,6 +42,7 @@ export default class ReactionPicker extends PureComponent { const { theme, deviceWidth, + isLandscape, } = this.props; const style = getStyleSheet(theme); const isSmallDevice = deviceWidth < SMALL_ICON_BREAKPOINT; @@ -68,8 +71,16 @@ export default class ReactionPicker extends PureComponent { ); }); + let paddingRes = padding(isLandscape, 12); + if (!paddingRes) { + paddingRes = { + paddingLeft: 12, + paddingRight: 12, + }; + } + return ( - + {list} { flex: 1, flexDirection: 'row', alignItems: 'center', - paddingLeft: 12, - paddingRight: 12, height: REACTION_PICKER_HEIGHT, justifyContent: 'space-between', },