1 | import * as React from 'react';
|
2 | import { StyleProp, ViewStyle } from 'react-native';
|
3 | import TouchableRipple from '../TouchableRipple/TouchableRipple';
|
4 | import type { $RemoveChildren } from '../../types';
|
5 | declare type Props = $RemoveChildren<typeof TouchableRipple> & {
|
6 | /**
|
7 | * Content of the `DataTableCell`.
|
8 | */
|
9 | children: React.ReactNode;
|
10 | /**
|
11 | * Align the text to the right. Generally monetary or number fields are aligned to right.
|
12 | */
|
13 | numeric?: boolean;
|
14 | /**
|
15 | * Function to execute on press.
|
16 | */
|
17 | onPress?: () => void;
|
18 | style?: StyleProp<ViewStyle>;
|
19 | };
|
20 | /**
|
21 | * A component to show a single cell inside of a table.
|
22 | *
|
23 | * <div class="screenshots">
|
24 | * <figure>
|
25 | * <img class="medium" src="screenshots/data-table-row-cell.png" />
|
26 | * </figure>
|
27 | * </div>
|
28 | *
|
29 | *
|
30 | * ## Usage
|
31 | * ```js
|
32 | * import * as React from 'react';
|
33 | * import { DataTable } from 'react-native-paper';
|
34 | *
|
35 | * const MyComponent = () => (
|
36 | * <DataTable.Row>
|
37 | * <DataTable.Cell numeric>1</DataTable.Cell>
|
38 | * <DataTable.Cell numeric>2</DataTable.Cell>
|
39 | * <DataTable.Cell numeric>3</DataTable.Cell>
|
40 | * <DataTable.Cell numeric>4</DataTable.Cell>
|
41 | * </DataTable.Row>
|
42 | * );
|
43 | *
|
44 | * export default MyComponent;
|
45 | * ```
|
46 | *
|
47 | * If you want to support multiline text, please use View instead, as multiline text doesn't comply with
|
48 | * MD Guidelines (https://github.com/callstack/react-native-paper/issues/2381).
|
49 | */
|
50 | declare const DataTableCell: {
|
51 | ({ children, style, numeric, ...rest }: Props): JSX.Element;
|
52 | displayName: string;
|
53 | };
|
54 | export default DataTableCell;
|