UNPKG

2.26 kBTypeScriptView Raw
1import * as React from 'react';
2import { StyleProp, View, ViewStyle } from 'react-native';
3declare type Props = React.ComponentPropsWithRef<typeof View> & {
4 /**
5 * Content of the `DataTableHeader`.
6 */
7 children: React.ReactNode;
8 style?: StyleProp<ViewStyle>;
9 /**
10 * @optional
11 */
12 theme: ReactNativePaper.Theme;
13};
14/**
15 * A component to display title in table header.
16 *
17 * <div class="screenshots">
18 * <figure>
19 * <img class="medium" src="screenshots/data-table-header.png" />
20 * </figure>
21 * </div>
22 *
23 *
24 * ## Usage
25 * ```js
26 * import * as React from 'react';
27 * import { DataTable } from 'react-native-paper';
28 *
29 * const MyComponent = () => (
30 * <DataTable>
31 * <DataTable.Header>
32 * <DataTable.Title
33 * sortDirection='descending'
34 * >
35 * Dessert
36 * </DataTable.Title>
37 * <DataTable.Title numeric>Calories</DataTable.Title>
38 * <DataTable.Title numeric>Fat (g)</DataTable.Title>
39 * </DataTable.Header>
40 * </DataTable>
41 * );
42 *
43 * export default MyComponent;
44 * ```
45 */
46declare const DataTableHeader: {
47 ({ children, style, theme, ...rest }: Props): JSX.Element;
48 displayName: string;
49};
50declare const _default: React.ComponentType<Pick<import("react-native").ViewProps & React.RefAttributes<View> & {
51 /**
52 * Content of the `DataTableHeader`.
53 */
54 children: React.ReactNode;
55 style?: StyleProp<ViewStyle>;
56 /**
57 * @optional
58 */
59 theme: ReactNativePaper.Theme;
60}, keyof import("react-native").ViewProps | keyof React.RefAttributes<View>> & {
61 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
62}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").ViewProps & React.RefAttributes<View> & {
63 /**
64 * Content of the `DataTableHeader`.
65 */
66 children: React.ReactNode;
67 style?: StyleProp<ViewStyle>;
68 /**
69 * @optional
70 */
71 theme: ReactNativePaper.Theme;
72}> & {
73 ({ children, style, theme, ...rest }: Props): JSX.Element;
74 displayName: string;
75}, {}>;
76export default _default;
77export { DataTableHeader };