From e7d100bf23c1942d3bd156709859f6ed560a753a Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Fri, 5 Aug 2022 22:29:20 +0200 Subject: [PATCH 1/2] Add an optional parameter --- src/pages/home/report/ReportTypingIndicator.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/home/report/ReportTypingIndicator.js b/src/pages/home/report/ReportTypingIndicator.js index 2ee31974690d..915b9f496641 100755 --- a/src/pages/home/report/ReportTypingIndicator.js +++ b/src/pages/home/report/ReportTypingIndicator.js @@ -16,6 +16,9 @@ const propTypes = { /** Key-value pairs of user logins and whether or not they are typing. Keys are logins. */ userTypingStatuses: PropTypes.objectOf(PropTypes.bool), + /** Optional styles for container element that will override the default styling for the report typing indicator */ + containerStyles: PropTypes.arrayOf(PropTypes.object), + /** Information about the network */ network: networkPropTypes.isRequired, @@ -23,6 +26,7 @@ const propTypes = { }; const defaultProps = { + containerStyles: [], userTypingStatuses: {}, }; From d4d9b2be4715bf174c2ea9d365da06b39f563e35 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Fri, 5 Aug 2022 22:37:52 +0200 Subject: [PATCH 2/2] Remove the containerStyles prop --- src/pages/home/report/ReportTypingIndicator.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/pages/home/report/ReportTypingIndicator.js b/src/pages/home/report/ReportTypingIndicator.js index 915b9f496641..552e126b9c5c 100755 --- a/src/pages/home/report/ReportTypingIndicator.js +++ b/src/pages/home/report/ReportTypingIndicator.js @@ -16,9 +16,6 @@ const propTypes = { /** Key-value pairs of user logins and whether or not they are typing. Keys are logins. */ userTypingStatuses: PropTypes.objectOf(PropTypes.bool), - /** Optional styles for container element that will override the default styling for the report typing indicator */ - containerStyles: PropTypes.arrayOf(PropTypes.object), - /** Information about the network */ network: networkPropTypes.isRequired, @@ -26,7 +23,6 @@ const propTypes = { }; const defaultProps = { - containerStyles: [], userTypingStatuses: {}, }; @@ -82,7 +78,6 @@ class ReportTypingIndicator extends React.Component { style={[ styles.chatItemComposeSecondaryRowSubText, styles.chatItemComposeSecondaryRowOffset, - ...this.props.containerStyles, ]} numberOfLines={1} >