MCPcopy Index your code
hub / github.com/callstack/react-native-paper / getThumbTintColor

Function getThumbTintColor

src/components/Switch/utils.ts:39–66  ·  view source on GitHub ↗
({
  theme,
  disabled,
  value,
  checkedColor,
}: BaseProps & { checkedColor: string })

Source from the content-addressed store, hash-verified

37};
38
39const getThumbTintColor = ({
40 theme,
41 disabled,
42 value,
43 checkedColor,
44}: BaseProps & { checkedColor: string }) => {
45 const isIOS = Platform.OS === 'ios';
46
47 if (isIOS) {
48 return undefined;
49 }
50
51 if (disabled) {
52 if (theme.dark) {
53 return grey800;
54 }
55 return grey400;
56 }
57
58 if (value) {
59 return checkedColor;
60 }
61
62 if (theme.dark) {
63 return grey400;
64 }
65 return grey50;
66};
67
68const getOnTintColor = ({
69 theme,

Callers 1

getSwitchColorFunction · 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…