Skip to content

Commit 79f23a7

Browse files
committed
feedback: minor changes
1 parent 90edd78 commit 79f23a7

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

ios/EnrichedMarkdown.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ - (void)applySelectionColor:(const EnrichedMarkdownProps &)props toTextView:(ENR
902902
if (isColorMeaningful(props.selectionColor)) {
903903
ENRMSetSelectionColor(textView, RCTUIColorFromSharedColor(props.selectionColor));
904904
} else {
905-
ENRMSetSelectionColor(textView, nil); // resets to inherited / system tint
905+
ENRMSetSelectionColor(textView, nil);
906906
}
907907
#endif
908908
}

ios/EnrichedMarkdownText.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &
417417
if (isColorMeaningful(newViewProps.selectionColor)) {
418418
ENRMSetSelectionColor(_textView, RCTUIColorFromSharedColor(newViewProps.selectionColor));
419419
} else {
420-
ENRMSetSelectionColor(_textView, nil); // resets to inherited / system tint
420+
ENRMSetSelectionColor(_textView, nil);
421421
}
422422
#endif
423423
}

ios/input/EnrichedMarkdownTextInput.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &
293293
if (isColorMeaningful(newViewProps.selectionColor)) {
294294
ENRMSetSelectionColor(_textView, RCTUIColorFromSharedColor(newViewProps.selectionColor));
295295
} else {
296-
ENRMSetSelectionColor(_textView, nil); // resets to inherited / system tint
296+
ENRMSetSelectionColor(_textView, nil);
297297
}
298298
}
299299

src/web/EnrichedMarkdownText.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const EnrichedMarkdownText = ({
104104
);
105105

106106
const wrapperStyle = useMemo<CSSProperties>(() => {
107-
const selectionBgVar = selectionColor
107+
const selectionColorCss = selectionColor
108108
? normalizeColor(String(selectionColor))
109109
: undefined;
110110

@@ -113,8 +113,8 @@ export const EnrichedMarkdownText = ({
113113
flexDirection: 'column',
114114
...(containerStyle as CSSProperties),
115115
...(selectable ? undefined : { userSelect: 'none' }),
116-
...(selectionBgVar != null
117-
? ({ ['--enrm-selection-bg']: selectionBgVar } as CSSProperties)
116+
...(selectionColorCss != null
117+
? ({ ['--enrm-selection-bg']: selectionColorCss } as CSSProperties)
118118
: null),
119119
};
120120
}, [containerStyle, selectable, selectionColor]);

0 commit comments

Comments
 (0)