1 | import * as React from 'react';
|
2 | import { StyleProp, ViewStyle, TextStyle } 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 | * Text content style of the `DataTableCell`.
|
21 | */
|
22 | textStyle?: StyleProp<TextStyle>;
|
23 | };
|
24 | /**
|
25 | * A component to show a single cell inside of a table.
|
26 | *
|
27 | * <div class="screenshots">
|
28 | * <figure>
|
29 | * <img class="medium" src="screenshots/data-table-row-cell.png" />
|
30 | * </figure>
|
31 | * </div>
|
32 | *
|
33 | *
|
34 | * ## Usage
|
35 | * ```js
|
36 | * import * as React from 'react';
|
37 | * import { DataTable } from 'react-native-paper';
|
38 | *
|
39 | * const MyComponent = () => (
|
40 | * <DataTable.Row>
|
41 | * <DataTable.Cell numeric>1</DataTable.Cell>
|
42 | * <DataTable.Cell numeric>2</DataTable.Cell>
|
43 | * <DataTable.Cell numeric>3</DataTable.Cell>
|
44 | * <DataTable.Cell numeric>4</DataTable.Cell>
|
45 | * </DataTable.Row>
|
46 | * );
|
47 | *
|
48 | * export default MyComponent;
|
49 | * ```
|
50 | *
|
51 | * If you want to support multiline text, please use View instead, as multiline text doesn't comply with
|
52 | * MD Guidelines (https://github.com/callstack/react-native-paper/issues/2381).
|
53 | */
|
54 | declare const DataTableCell: {
|
55 | ({ children, textStyle, style, numeric, ...rest }: Props): JSX.Element;
|
56 | displayName: string;
|
57 | };
|
58 | export default DataTableCell;
|