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

Function DataTableRow

src/components/DataTable/DataTableRow.tsx:60–87  ·  view source on GitHub ↗
({
  onPress,
  style,
  children,
  pointerEvents,
  theme: themeOverrides,
  ...rest
}: Props)

Source from the content-addressed store, hash-verified

58 * @extends TouchableRipple props https://callstack.github.io/react-native-paper/docs/components/TouchableRipple
59 */
60const DataTableRow = ({
61 onPress,
62 style,
63 children,
64 pointerEvents,
65 theme: themeOverrides,
66 ...rest
67}: Props) => {
68 const theme = useInternalTheme(themeOverrides);
69 const borderBottomColor = theme.isV3
70 ? theme.colors.surfaceVariant
71 : color(theme.dark ? white : black)
72 .alpha(0.12)
73 .rgb()
74 .string();
75
76 return (
77 <TouchableRipple
78 {...rest}
79 onPress={onPress}
80 style={[styles.container, { borderBottomColor }, style]}
81 >
82 <View style={styles.content} pointerEvents={pointerEvents}>
83 {children}
84 </View>
85 </TouchableRipple>
86 );
87};
88
89DataTableRow.displayName = 'DataTable.Row';
90

Callers

nothing calls this directly

Calls 1

useInternalThemeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…