UNPKG

4.8 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.ComponentClass<Pick<Props, "ref" | "style" | "children" | "pointerEvents" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "key" | "hitSlop" | "removeClippedSubviews" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture"> & {
51 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
52}, any> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<(React.ComponentClass<Props, any> & {
53 ({ children, style, theme, ...rest }: Props): JSX.Element;
54 displayName: string;
55}) | (React.FunctionComponent<Props> & {
56 ({ children, style, theme, ...rest }: Props): JSX.Element;
57 displayName: string;
58}), {}>) | (React.FunctionComponent<Pick<Props, "ref" | "style" | "children" | "pointerEvents" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "key" | "hitSlop" | "removeClippedSubviews" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture"> & {
59 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
60}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<(React.ComponentClass<Props, any> & {
61 ({ children, style, theme, ...rest }: Props): JSX.Element;
62 displayName: string;
63}) | (React.FunctionComponent<Props> & {
64 ({ children, style, theme, ...rest }: Props): JSX.Element;
65 displayName: string;
66}), {}>);
67export default _default;
68export { DataTableHeader };