UNPKG

1.66 kBTypeScriptView Raw
1import * as React from 'react';
2import { GestureResponderEvent, StyleProp, ViewProps, ViewStyle } from 'react-native';
3import type { $RemoveChildren, ThemeProp } from '../../types';
4import TouchableRipple from '../TouchableRipple/TouchableRipple';
5export type Props = $RemoveChildren<typeof TouchableRipple> & {
6 /**
7 * Content of the `DataTableRow`.
8 */
9 children: React.ReactNode;
10 /**
11 * Function to execute on press.
12 */
13 onPress?: (e: GestureResponderEvent) => void;
14 style?: StyleProp<ViewStyle>;
15 /**
16 * @optional
17 */
18 theme?: ThemeProp;
19 /**
20 * `pointerEvents` passed to the `View` container, which is wrapping children within `TouchableRipple`.
21 */
22 pointerEvents?: ViewProps['pointerEvents'];
23};
24/**
25 * A component to show a single row inside of a table.
26 *
27 * ## Usage
28 * ```js
29 * import * as React from 'react';
30 * import { DataTable } from 'react-native-paper';
31 *
32 * const MyComponent = () => (
33 * <DataTable.Row>
34 * <DataTable.Cell numeric>1</DataTable.Cell>
35 * <DataTable.Cell numeric>2</DataTable.Cell>
36 * <DataTable.Cell numeric>3</DataTable.Cell>
37 * <DataTable.Cell numeric>4</DataTable.Cell>
38 * </DataTable.Row>
39 * );
40 *
41 * export default MyComponent;
42 * ```
43 *
44 * @extends TouchableRipple props https://callstack.github.io/react-native-paper/docs/components/TouchableRipple
45 */
46declare const DataTableRow: {
47 ({ onPress, style, children, pointerEvents, theme: themeOverrides, ...rest }: Props): React.JSX.Element;
48 displayName: string;
49};
50export default DataTableRow;
51export { DataTableRow };
52//# sourceMappingURL=DataTableRow.d.ts.map
\No newline at end of file