({
theme,
disabled,
value,
checkedColor,
}: BaseProps & { checkedColor: string })
| 66 | }; |
| 67 | |
| 68 | const getOnTintColor = ({ |
| 69 | theme, |
| 70 | disabled, |
| 71 | value, |
| 72 | checkedColor, |
| 73 | }: BaseProps & { checkedColor: string }) => { |
| 74 | const isIOS = Platform.OS === 'ios'; |
| 75 | |
| 76 | if (isIOS) { |
| 77 | return checkedColor; |
| 78 | } |
| 79 | |
| 80 | if (disabled) { |
| 81 | if (theme.dark) { |
| 82 | if (theme.isV3) { |
| 83 | return setColor(white).alpha(0.06).rgb().string(); |
| 84 | } |
| 85 | return setColor(white).alpha(0.1).rgb().string(); |
| 86 | } |
| 87 | return setColor(black).alpha(0.12).rgb().string(); |
| 88 | } |
| 89 | |
| 90 | if (value) { |
| 91 | return setColor(checkedColor).alpha(0.5).rgb().string(); |
| 92 | } |
| 93 | |
| 94 | if (theme.dark) { |
| 95 | return grey700; |
| 96 | } |
| 97 | return 'rgb(178, 175, 177)'; |
| 98 | }; |
| 99 | |
| 100 | export const getSwitchColor = ({ |
| 101 | theme, |
no outgoing calls
no test coverage detected
searching dependent graphs…