diff --git a/src/CONST/index.ts b/src/CONST/index.ts index 6e9546ea95f6..22ff4a0621b6 100644 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -262,6 +262,7 @@ const CONST = { POPOVER_DROPDOWN_WIDTH: 334, POPOVER_DROPDOWN_MIN_HEIGHT: 0, POPOVER_DROPDOWN_MAX_HEIGHT: 416, + POPOVER_REPORT_SUBMIT_TO_CONTENT_HEIGHT: 416, POPOVER_MENU_MAX_HEIGHT: 496, POPOVER_MENU_MAX_HEIGHT_MOBILE: 432, POPOVER_DATE_WIDTH: 338, diff --git a/src/components/ButtonWithDropdownMenu/index.tsx b/src/components/ButtonWithDropdownMenu/index.tsx index 274d228b2217..04726b6cb278 100644 --- a/src/components/ButtonWithDropdownMenu/index.tsx +++ b/src/components/ButtonWithDropdownMenu/index.tsx @@ -36,6 +36,7 @@ function ButtonWithDropdownMenu({ref, ...props}: ButtonWithDropdownM menuHeaderText = '', customText, style, + buttonStyle, disabledStyle, buttonSize = CONST.DROPDOWN_BUTTON_SIZE.MEDIUM, anchorAlignment = defaultAnchorAlignment, @@ -146,7 +147,15 @@ function ButtonWithDropdownMenu({ref, ...props}: ButtonWithDropdownM isActive: useKeyboardShortcuts, }, ); - const splitButtonWrapperStyle = isSplitButton ? [styles.flexRow, styles.justifyContentBetween, styles.alignItemsCenter] : {}; + const splitButtonWrapperStyle = isSplitButton ? [styles.flexRow, styles.justifyContentBetween, styles.alignItemsCenter] : undefined; + let dropdownButtonStyle; + if (isSplitButton) { + dropdownButtonStyle = [splitButtonWrapperStyle, style]; + } else if (style) { + dropdownButtonStyle = [styles.w100, style]; + } + const defaultStyle = style ? styles.w100 : undefined; + const nonSplitButtonStyle = buttonStyle ? [styles.w100, buttonStyle] : defaultStyle; const isTextTooLong = customText && customText?.length > 6; const handlePress = useCallback( @@ -167,7 +176,7 @@ function ButtonWithDropdownMenu({ref, ...props}: ButtonWithDropdownM return ( {shouldAlwaysShowDropdownMenu || options.length > 1 ? ( - +