MCPcopy
hub / github.com/callstack/react-native-paper / getSelectionColor

Function getSelectionColor

src/components/TextInput/helpers.tsx:389–405  ·  view source on GitHub ↗
({
  activeColor,
  customSelectionColor,
}: {
  activeColor: string;
  customSelectionColor?: string;
})

Source from the content-addressed store, hash-verified

387};
388
389const getSelectionColor = ({
390 activeColor,
391 customSelectionColor,
392}: {
393 activeColor: string;
394 customSelectionColor?: string;
395}) => {
396 if (typeof customSelectionColor !== 'undefined') {
397 return customSelectionColor;
398 }
399
400 if (Platform.OS === 'android') {
401 return color(activeColor).alpha(0.54).rgb().string();
402 }
403
404 return activeColor;
405};
406
407const getFlatBackgroundColor = ({ theme, disabled }: BaseProps) => {
408 if (theme.isV3) {

Callers 2

getFlatInputColorsFunction · 0.85
getOutlinedInputColorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…