Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNMobile: Ensure text is always visible within Contact Info block #33873

Merged
merged 4 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: bugfix

RNMobile: Ensure text is always visible in Contact Info block.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const AddressEdit = props => {
isSelected,
setAttributes,
onFocus,
style: { baseColors: { color: editorColors = {} } = {} } = {},
} = props;

const textData = [
Expand Down Expand Up @@ -98,10 +99,10 @@ const AddressEdit = props => {
styles.placeholder,
styles.placeholderDark
);
const textColors = usePreferredColorSchemeStyle(
styles.blockEditorPlainText,
styles.blockEditorPlainTextDark
);
const textColors = {
...usePreferredColorSchemeStyle( styles.blockEditorPlainText, styles.blockEditorPlainTextDark ),
...( editorColors?.text && { color: editorColors.text } ),
};

const onFocusTextInput = index => () => {
if ( index < textInputsSelected.length ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,24 @@ import simpleInput from '../../shared/simple-input';
import styles from './style.scss';

const CommonChildEdit = props => {
const { setAttributes, getStylesFromColorScheme, type, keyboardType, save, label, attributeKey } =
props;
const {
setAttributes,
getStylesFromColorScheme,
type,
keyboardType,
save,
label,
attributeKey,
style: { baseColors: { color: editorColors = {} } = {} } = {},
} = props;
const { color: placeholderTextColor } = getStylesFromColorScheme(
styles.placeholder,
styles.placeholderDark
);
const textColors = getStylesFromColorScheme(
styles.blockEditorPlainText,
styles.blockEditorPlainTextDark
);
const textColors = {
...getStylesFromColorScheme( styles.blockEditorPlainText, styles.blockEditorPlainTextDark ),
...( editorColors?.text && { color: editorColors.text } ),
};
const nativeProps = {
keyboardType,
style: textColors,
Expand Down
Loading