From 716de60445f9940d0639792016811e6f6b002a2e Mon Sep 17 00:00:00 2001 From: Ofer Morag <ofer2980@gmail.com> Date: Wed, 1 Jan 2020 12:39:46 +0200 Subject: [PATCH] Update RichTextToolbar.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Support custom toolbar action icons which do not have padding – center them horizontally (in addition to vertical center layout, which already done) --- src/RichTextToolbar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RichTextToolbar.js b/src/RichTextToolbar.js index d97f4cb7..58c1ca99 100644 --- a/src/RichTextToolbar.js +++ b/src/RichTextToolbar.js @@ -105,7 +105,7 @@ export default class RichTextToolbar extends Component { <TouchableOpacity key={action} style={[ - {height: 50, width: 50, justifyContent: 'center'}, + {height: 50, width: 50, justifyContent: 'center', alignItems: 'center'}, selected ? this._getButtonSelectedStyle() : this._getButtonUnselectedStyle() ]} onPress={() => this._onPress(action)} @@ -189,4 +189,4 @@ const styles = StyleSheet.create({ backgroundColor: 'red' }, defaultUnselectedButton: {} -}); \ No newline at end of file +});