Skip to content

Commit

Permalink
Add isComposerFullSize to PropTypes and defaultProps
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Sebastian Cardona <js.cardona64@gmail.com>
  • Loading branch information
jscardona12 committed Sep 8, 2023
1 parent b9b0072 commit e703657
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/components/Composer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ const propTypes = {
/** Whether this is the report action compose */
isReportActionCompose: PropTypes.bool,

/** Whether the sull composer is open */
isComposerFullSize: PropTypes.bool,

...withLocalizePropTypes,

...windowDimensionsPropTypes,
Expand Down Expand Up @@ -111,6 +114,7 @@ const defaultProps = {
shouldCalculateCaretPosition: false,
checkComposerVisibility: () => false,
isReportActionCompose: false,
isComposerFullSize: false,
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/styles/StyleUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ function getMentionTextColor(isOurMention: boolean): string {
*/
function getComposeTextAreaPadding(numberOfLines: number, isComposerFullSize: boolean): ViewStyle | CSSProperties {
let paddingValue = 5;
// If isComposerFullSize paddingValue will always be 5
// Issue #26222: If isComposerFullSize paddingValue will always be 5 to prevent padding jumps when adding multiple lines.
if (!isComposerFullSize) {
if (numberOfLines === 1) {
paddingValue = 9;
Expand Down

0 comments on commit e703657

Please sign in to comment.