MCPcopy Create free account
hub / github.com/callstack/react-native-paper / getRippleColor

Function getRippleColor

src/components/TouchableRipple/utils.ts:27–46  ·  view source on GitHub ↗
({
  theme,
  rippleColor,
}: {
  theme: InternalTheme;
  rippleColor?: ColorValue;
})

Source from the content-addressed store, hash-verified

25};
26
27const getRippleColor = ({
28 theme,
29 rippleColor,
30}: {
31 theme: InternalTheme;
32 rippleColor?: ColorValue;
33}) => {
34 if (rippleColor) {
35 return rippleColor;
36 }
37
38 if (theme.isV3) {
39 return color(theme.colors.onSurface).alpha(0.12).rgb().string();
40 }
41
42 if (theme.dark) {
43 return color(theme.colors.text).alpha(0.32).rgb().string();
44 }
45 return color(theme.colors.text).alpha(0.2).rgb().string();
46};
47
48export const getTouchableRippleColors = ({
49 theme,

Callers 1

getTouchableRippleColorsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…