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

Function getSwitchColor

src/components/Switch/utils.ts:100–113  ·  view source on GitHub ↗
({
  theme,
  disabled,
  value,
  color,
}: BaseProps & { color?: string })

Source from the content-addressed store, hash-verified

98};
99
100export const getSwitchColor = ({
101 theme,
102 disabled,
103 value,
104 color,
105}: BaseProps & { color?: string }) => {
106 const checkedColor = getCheckedColor({ theme, color });
107
108 return {
109 onTintColor: getOnTintColor({ theme, disabled, value, checkedColor }),
110 thumbTintColor: getThumbTintColor({ theme, disabled, value, checkedColor }),
111 checkedColor,
112 };
113};

Callers 2

SwitchFunction · 0.90
Switch.test.tsxFile · 0.90

Calls 3

getCheckedColorFunction · 0.85
getOnTintColorFunction · 0.85
getThumbTintColorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…