1 | import * as React from 'react';
|
2 | import { GestureResponderEvent, Pressable, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
3 | import type { ThemeProp } from '../../types';
|
4 | export type Props = React.ComponentPropsWithRef<typeof Pressable> & {
|
5 | /**
|
6 | * Text content of the `DataTableTitle`.
|
7 | */
|
8 | children: React.ReactNode;
|
9 | /**
|
10 | * Align the text to the right. Generally monetary or number fields are aligned to right.
|
11 | */
|
12 | numeric?: boolean;
|
13 | /**
|
14 | * Direction of sorting. An arrow indicating the direction is displayed when this is given.
|
15 | */
|
16 | sortDirection?: 'ascending' | 'descending';
|
17 | /**
|
18 | * The number of lines to show.
|
19 | */
|
20 | numberOfLines?: number;
|
21 | /**
|
22 | * Function to execute on press.
|
23 | */
|
24 | onPress?: (e: GestureResponderEvent) => void;
|
25 | style?: StyleProp<ViewStyle>;
|
26 | /**
|
27 | * Text content style of the `DataTableTitle`.
|
28 | */
|
29 | textStyle?: StyleProp<TextStyle>;
|
30 | /**
|
31 | * Specifies the largest possible scale a text font can reach.
|
32 | */
|
33 | maxFontSizeMultiplier?: number;
|
34 | /**
|
35 | * @optional
|
36 | */
|
37 | theme?: ThemeProp;
|
38 | };
|
39 | /**
|
40 | * A component to display title in table header.
|
41 | *
|
42 | * ## Usage
|
43 | * ```js
|
44 | * import * as React from 'react';
|
45 | * import { DataTable } from 'react-native-paper';
|
46 | *
|
47 | * const MyComponent = () => (
|
48 | * <DataTable>
|
49 | * <DataTable.Header>
|
50 | * <DataTable.Title
|
51 | * sortDirection='descending'
|
52 | * >
|
53 | * Dessert
|
54 | * </DataTable.Title>
|
55 | * <DataTable.Title numeric>Calories</DataTable.Title>
|
56 | * <DataTable.Title numeric>Fat (g)</DataTable.Title>
|
57 | * </DataTable.Header>
|
58 | * </DataTable>
|
59 | * );
|
60 | *
|
61 | * export default MyComponent;
|
62 | * ```
|
63 | */
|
64 | declare const DataTableTitle: {
|
65 | ({ numeric, children, onPress, sortDirection, textStyle, style, theme: themeOverrides, numberOfLines, maxFontSizeMultiplier, ...rest }: Props): React.JSX.Element;
|
66 | displayName: string;
|
67 | };
|
68 | export default DataTableTitle;
|
69 | export { DataTableTitle };
|
70 | //# sourceMappingURL=DataTableTitle.d.ts.map |
\ | No newline at end of file |