1 | import * as React from 'react';
|
2 | import { StyleProp, ViewStyle, TextStyle, GestureResponderEvent } from 'react-native';
|
3 | import type { $RemoveChildren } from '../../types';
|
4 | import TouchableRipple from '../TouchableRipple/TouchableRipple';
|
5 | export 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?: (e: GestureResponderEvent) => void;
|
18 | style?: StyleProp<ViewStyle>;
|
19 | /**
|
20 | * Text content style of the `DataTableCell`.
|
21 | */
|
22 | textStyle?: StyleProp<TextStyle>;
|
23 | /**
|
24 | * Specifies the largest possible scale a text font can reach.
|
25 | */
|
26 | maxFontSizeMultiplier?: number;
|
27 | /**
|
28 | * testID to be used on tests.
|
29 | */
|
30 | testID?: string;
|
31 | };
|
32 | /**
|
33 | * A component to show a single cell inside of a table.
|
34 | *
|
35 | * ## Usage
|
36 | * ```js
|
37 | * import * as React from 'react';
|
38 | * import { DataTable } from 'react-native-paper';
|
39 | *
|
40 | * const MyComponent = () => (
|
41 | * <DataTable.Row>
|
42 | * <DataTable.Cell numeric>1</DataTable.Cell>
|
43 | * <DataTable.Cell numeric>2</DataTable.Cell>
|
44 | * <DataTable.Cell numeric>3</DataTable.Cell>
|
45 | * <DataTable.Cell numeric>4</DataTable.Cell>
|
46 | * </DataTable.Row>
|
47 | * );
|
48 | *
|
49 | * export default MyComponent;
|
50 | * ```
|
51 | *
|
52 | * If you want to support multiline text, please use View instead, as multiline text doesn't comply with
|
53 | * MD Guidelines (https://github.com/callstack/react-native-paper/issues/2381).
|
54 | *
|
55 | * @extends TouchableRipple props https://callstack.github.io/react-native-paper/docs/components/TouchableRipple
|
56 | */
|
57 | declare const DataTableCell: {
|
58 | ({ children, textStyle, style, numeric, maxFontSizeMultiplier, testID, ...rest }: Props): React.JSX.Element;
|
59 | displayName: string;
|
60 | };
|
61 | export default DataTableCell;
|
62 | //# sourceMappingURL=DataTableCell.d.ts.map |
\ | No newline at end of file |