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

Function getBackgroundColor

src/components/Card/utils.tsx:80–96  ·  view source on GitHub ↗
({
  theme,
  isMode,
}: {
  theme: InternalTheme;
  isMode: (mode: CardMode) => boolean;
})

Source from the content-addressed store, hash-verified

78};
79
80const getBackgroundColor = ({
81 theme,
82 isMode,
83}: {
84 theme: InternalTheme;
85 isMode: (mode: CardMode) => boolean;
86}) => {
87 if (theme.isV3) {
88 if (isMode('contained')) {
89 return theme.colors.surfaceVariant;
90 }
91 if (isMode('outlined')) {
92 return theme.colors.surface;
93 }
94 }
95 return undefined;
96};
97
98export const getCardColors = ({
99 theme,

Callers 1

getCardColorsFunction · 0.70

Calls 1

isModeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…