From 4f020740e004751241ec9616bff899ca5a9a3dba Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 25 Jul 2023 13:15:42 +0800 Subject: [PATCH] apply the inline style to the wrapper too --- src/components/PressableWithSecondaryInteraction/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/PressableWithSecondaryInteraction/index.js b/src/components/PressableWithSecondaryInteraction/index.js index a20355c49a8f..2771db6206ae 100644 --- a/src/components/PressableWithSecondaryInteraction/index.js +++ b/src/components/PressableWithSecondaryInteraction/index.js @@ -73,11 +73,12 @@ class PressableWithSecondaryInteraction extends Component { render() { const defaultPressableProps = _.omit(this.props, ['onSecondaryInteraction', 'children', 'onLongPress']); + const inlineStyle = this.props.inline ? styles.dInline : {}; // On Web, Text does not support LongPress events thus manage inline mode with styling instead of using Text. return ( (this.pressableRef = el)} // eslint-disable-next-line react/jsx-props-no-spreading {...defaultPressableProps} - style={(state) => [StyleUtils.parseStyleFromFunction(this.props.style, state), ...[this.props.inline && styles.dInline]]} + style={(state) => [StyleUtils.parseStyleFromFunction(this.props.style, state), inlineStyle]} > {this.props.children}