diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index c3f1cec4ef1a..d4471b1a6c38 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -331,6 +331,8 @@ function BaseTextInput(props) { // Stop scrollbar flashing when breaking lines with autoGrowHeight enabled. props.autoGrowHeight && StyleUtils.getAutoGrowHeightInputStyle(textInputHeight, maxHeight), + // Add disabled color theme when field is not editable. + props.disabled && styles.textInputDisabled, ]} multiline={isMultiline} maxLength={props.maxLength} diff --git a/src/styles/styles.js b/src/styles/styles.js index d6258da62cbc..9ac4587b7117 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -777,6 +777,22 @@ const styles = { borderColor: themeColors.danger, }, + textInputDisabled: { + // Adding disabled color theme to indicate user that the field is not editable. + backgroundColor: themeColors.highlightBG, + borderBottomWidth: 2, + borderColor: themeColors.borderLighter, + // Adding browser specefic style to bring consistency between Safari and other platforms. + // Applying the Webkit styles only to browsers as it is not available in native. + ...(Browser.getBrowser() + ? { + WebkitTextFillColor: themeColors.textSupporting, + WebkitOpacity: 1, + } + : {}), + color: themeColors.textSupporting, + }, + uploadReceiptView: (isSmallScreenWidth) => ({ borderRadius: variables.componentBorderRadiusLarge, borderWidth: isSmallScreenWidth ? 0 : 2,