UNPKG

1.26 kBTypeScriptView Raw
1import * as React from 'react';
2import { StyleProp, View, ViewStyle } from 'react-native';
3import type { ThemeProp } from '../../types';
4export type Props = React.ComponentPropsWithRef<typeof View> & {
5 /**
6 * Content of the `DataTableHeader`.
7 */
8 children: React.ReactNode;
9 style?: StyleProp<ViewStyle>;
10 /**
11 * @optional
12 */
13 theme?: ThemeProp;
14};
15/**
16 * A component to display title in table header.
17 *
18 * ## Usage
19 * ```js
20 * import * as React from 'react';
21 * import { DataTable } from 'react-native-paper';
22 *
23 * const MyComponent = () => (
24 * <DataTable>
25 * <DataTable.Header>
26 * <DataTable.Title
27 * sortDirection='descending'
28 * >
29 * Dessert
30 * </DataTable.Title>
31 * <DataTable.Title numeric>Calories</DataTable.Title>
32 * <DataTable.Title numeric>Fat (g)</DataTable.Title>
33 * </DataTable.Header>
34 * </DataTable>
35 * );
36 *
37 * export default MyComponent;
38 * ```
39 */
40declare const DataTableHeader: {
41 ({ children, style, theme: themeOverrides, ...rest }: Props): React.JSX.Element;
42 displayName: string;
43};
44export default DataTableHeader;
45export { DataTableHeader };
46//# sourceMappingURL=DataTableHeader.d.ts.map
\No newline at end of file