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

Function getOutlinedInputColors

src/components/TextInput/helpers.tsx:522–561  ·  view source on GitHub ↗
({
  activeOutlineColor,
  customOutlineColor,
  customSelectionColor,
  textColor,
  disabled,
  error,
  theme,
}: {
  activeOutlineColor?: string;
  customOutlineColor?: string;
  customSelectionColor?: string;
  textColor?: string;
  disabled?: boolean;
  error?: boolean;
  theme: InternalTheme;
})

Source from the content-addressed store, hash-verified

520};
521
522export const getOutlinedInputColors = ({
523 activeOutlineColor,
524 customOutlineColor,
525 customSelectionColor,
526 textColor,
527 disabled,
528 error,
529 theme,
530}: {
531 activeOutlineColor?: string;
532 customOutlineColor?: string;
533 customSelectionColor?: string;
534 textColor?: string;
535 disabled?: boolean;
536 error?: boolean;
537 theme: InternalTheme;
538}) => {
539 const baseOutlinedColorProps = { theme, disabled };
540 const activeColor = getActiveColor({
541 ...baseOutlinedColorProps,
542 error,
543 activeOutlineColor,
544 mode: 'outlined',
545 });
546
547 return {
548 inputTextColor: getInputTextColor({
549 ...baseOutlinedColorProps,
550 textColor,
551 }),
552 activeColor,
553 outlineColor: getOutlinedOutlineInputColor({
554 ...baseOutlinedColorProps,
555 customOutlineColor,
556 }),
557 placeholderColor: getPlaceholderColor(baseOutlinedColorProps),
558 selectionColor: getSelectionColor({ activeColor, customSelectionColor }),
559 errorColor: theme.colors.error,
560 };
561};
562
563export const getConstants = (isV3?: boolean) => {
564 // Text input affix

Callers 2

TextInputOutlinedFunction · 0.90
TextInput.test.tsxFile · 0.90

Calls 5

getActiveColorFunction · 0.85
getInputTextColorFunction · 0.85
getPlaceholderColorFunction · 0.85
getSelectionColorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…