UNPKG

8.95 kBTypeScriptView Raw
1import * as React from 'react';
2import { StyleProp, ViewStyle, ViewProps } from 'react-native';
3import TouchableRipple from '../TouchableRipple/TouchableRipple';
4import type { $RemoveChildren } from '../../types';
5declare type Props = $RemoveChildren<typeof TouchableRipple> & {
6 /**
7 * Content of the `DataTableRow`.
8 */
9 children: React.ReactNode;
10 /**
11 * Function to execute on press.
12 */
13 onPress?: () => void;
14 style?: StyleProp<ViewStyle>;
15 /**
16 * @optional
17 */
18 theme: ReactNativePaper.Theme;
19 /**
20 * `pointerEvents` passed to the `View` container, which is wrapping children within `TouchableRipple`.
21 */
22 pointerEvents?: ViewProps['pointerEvents'];
23};
24/**
25 * A component to show a single row inside of a table.
26 *
27 * <div class="screenshots">
28 * <figure>
29 * <img class="medium" src="screenshots/data-table-row-cell.png" />
30 * </figure>
31 * </div>
32 *
33 *
34 * ## Usage
35 * ```js
36 * import * as React from 'react';
37 * import { DataTable } from 'react-native-paper';
38 *
39 * const MyComponent = () => (
40 * <DataTable.Row>
41 * <DataTable.Cell numeric>1</DataTable.Cell>
42 * <DataTable.Cell numeric>2</DataTable.Cell>
43 * <DataTable.Cell numeric>3</DataTable.Cell>
44 * <DataTable.Cell numeric>4</DataTable.Cell>
45 * </DataTable.Row>
46 * );
47 *
48 * export default MyComponent;
49 * ```
50 */
51declare const DataTableRow: {
52 ({ onPress, style, theme, children, pointerEvents, ...rest }: Props): JSX.Element;
53 displayName: string;
54};
55declare const _default: React.ComponentType<Pick<$RemoveChildren<React.ComponentType<Pick<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
56 borderless?: boolean | undefined;
57 background?: Object | undefined;
58 centered?: boolean | undefined;
59 disabled?: boolean | undefined;
60 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
61 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
62 rippleColor?: string | undefined;
63 underlayColor?: string | undefined;
64 children: React.ReactNode;
65 style?: StyleProp<ViewStyle>;
66 theme: ReactNativePaper.Theme;
67}, keyof import("react-native").TouchableWithoutFeedbackProps | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered" | keyof React.RefAttributes<import("react-native").TouchableWithoutFeedback>> & {
68 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
69}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
70 borderless?: boolean | undefined;
71 background?: Object | undefined;
72 centered?: boolean | undefined;
73 disabled?: boolean | undefined;
74 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
75 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
76 rippleColor?: string | undefined;
77 underlayColor?: string | undefined;
78 children: React.ReactNode;
79 style?: StyleProp<ViewStyle>;
80 theme: ReactNativePaper.Theme;
81}> & {
82 ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
83 borderless?: boolean | undefined;
84 background?: Object | undefined;
85 centered?: boolean | undefined;
86 disabled?: boolean | undefined;
87 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
88 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
89 rippleColor?: string | undefined;
90 underlayColor?: string | undefined;
91 children: React.ReactNode;
92 style?: StyleProp<ViewStyle>;
93 theme: ReactNativePaper.Theme;
94 }): JSX.Element;
95 supported: boolean;
96}, {}>> & {
97 /**
98 * Content of the `DataTableRow`.
99 */
100 children: React.ReactNode;
101 /**
102 * Function to execute on press.
103 */
104 onPress?: (() => void) | undefined;
105 style?: StyleProp<ViewStyle>;
106 /**
107 * @optional
108 */
109 theme: ReactNativePaper.Theme;
110 /**
111 * `pointerEvents` passed to the `View` container, which is wrapping children within `TouchableRipple`.
112 */
113 pointerEvents?: "box-none" | "none" | "box-only" | "auto" | undefined;
114}, "style" | "children" | "pointerEvents" | "onLayout" | "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "testID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "key" | "hitSlop" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "disabled" | "onBlur" | "onFocus" | "pressRetentionOffset" | "touchSoundDisabled" | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered"> & {
115 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
116}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<$RemoveChildren<React.ComponentType<Pick<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
117 borderless?: boolean | undefined;
118 background?: Object | undefined;
119 centered?: boolean | undefined;
120 disabled?: boolean | undefined;
121 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
122 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
123 rippleColor?: string | undefined;
124 underlayColor?: string | undefined;
125 children: React.ReactNode;
126 style?: StyleProp<ViewStyle>;
127 theme: ReactNativePaper.Theme;
128}, keyof import("react-native").TouchableWithoutFeedbackProps | "background" | "borderless" | "rippleColor" | "underlayColor" | "centered" | keyof React.RefAttributes<import("react-native").TouchableWithoutFeedback>> & {
129 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
130}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
131 borderless?: boolean | undefined;
132 background?: Object | undefined;
133 centered?: boolean | undefined;
134 disabled?: boolean | undefined;
135 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
136 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
137 rippleColor?: string | undefined;
138 underlayColor?: string | undefined;
139 children: React.ReactNode;
140 style?: StyleProp<ViewStyle>;
141 theme: ReactNativePaper.Theme;
142}> & {
143 ({ style, background: _background, borderless, disabled: disabledProp, rippleColor, underlayColor: _underlayColor, children, theme, ...rest }: import("react-native").TouchableWithoutFeedbackProps & React.RefAttributes<import("react-native").TouchableWithoutFeedback> & {
144 borderless?: boolean | undefined;
145 background?: Object | undefined;
146 centered?: boolean | undefined;
147 disabled?: boolean | undefined;
148 onPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
149 onLongPress?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
150 rippleColor?: string | undefined;
151 underlayColor?: string | undefined;
152 children: React.ReactNode;
153 style?: StyleProp<ViewStyle>;
154 theme: ReactNativePaper.Theme;
155 }): JSX.Element;
156 supported: boolean;
157}, {}>> & {
158 /**
159 * Content of the `DataTableRow`.
160 */
161 children: React.ReactNode;
162 /**
163 * Function to execute on press.
164 */
165 onPress?: (() => void) | undefined;
166 style?: StyleProp<ViewStyle>;
167 /**
168 * @optional
169 */
170 theme: ReactNativePaper.Theme;
171 /**
172 * `pointerEvents` passed to the `View` container, which is wrapping children within `TouchableRipple`.
173 */
174 pointerEvents?: "box-none" | "none" | "box-only" | "auto" | undefined;
175}> & {
176 ({ onPress, style, theme, children, pointerEvents, ...rest }: Props): JSX.Element;
177 displayName: string;
178}, {}>;
179export default _default;
180export { DataTableRow };
181
\No newline at end of file