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

Function getFlatBackgroundColor

src/components/TextInput/helpers.tsx:407–423  ·  view source on GitHub ↗
({ theme, disabled }: BaseProps)

Source from the content-addressed store, hash-verified

405};
406
407const getFlatBackgroundColor = ({ theme, disabled }: BaseProps) => {
408 if (theme.isV3) {
409 if (disabled) {
410 return color(theme.colors.onSurface).alpha(0.04).rgb().string();
411 } else {
412 return theme.colors.surfaceVariant;
413 }
414 }
415
416 if (disabled) {
417 return undefined;
418 }
419
420 return theme.dark
421 ? color(theme.colors?.background).lighten(0.24).rgb().string()
422 : color(theme.colors?.background).darken(0.06).rgb().string();
423};
424
425const getFlatUnderlineColor = ({
426 theme,

Callers 1

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