UNPKG

2.16 kBTypeScriptView Raw
1import * as React from 'react';
2import { ViewStyle, Image, StyleProp } from 'react-native';
3declare type Props = React.ComponentPropsWithRef<typeof Image> & {
4 /**
5 * @internal
6 */
7 index?: number;
8 /**
9 * @internal
10 */
11 total?: number;
12 style?: StyleProp<ViewStyle>;
13 /**
14 * @optional
15 */
16 theme: ReactNativePaper.Theme;
17};
18/**
19 * A component to show a cover image inside a Card.
20 *
21 * <div class="screenshots">
22 * <figure>
23 * <img class="medium" src="screenshots/card-cover.png" />
24 * </figure>
25 * </div>
26 *
27 * ## Usage
28 * ```js
29 * import * as React from 'react';
30 * import { Card } from 'react-native-paper';
31 *
32 * const MyComponent = () => (
33 * <Card>
34 * <Card.Cover source={{ uri: 'https://picsum.photos/700' }} />
35 * </Card>
36 * );
37 *
38 * export default MyComponent;
39 * ```
40 *
41 * @extends Image props https://reactnative.dev/docs/image#props
42 */
43declare const CardCover: {
44 ({ index, total, style, theme, ...rest }: Props): JSX.Element;
45 displayName: string;
46};
47declare const _default: React.ComponentType<Pick<import("react-native").ImageProps & React.RefAttributes<Image> & {
48 /**
49 * @internal
50 */
51 index?: number | undefined;
52 /**
53 * @internal
54 */
55 total?: number | undefined;
56 style?: StyleProp<ViewStyle>;
57 /**
58 * @optional
59 */
60 theme: ReactNativePaper.Theme;
61}, keyof import("react-native").ImageProps | "index" | "total" | keyof React.RefAttributes<Image>> & {
62 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
63}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").ImageProps & React.RefAttributes<Image> & {
64 /**
65 * @internal
66 */
67 index?: number | undefined;
68 /**
69 * @internal
70 */
71 total?: number | undefined;
72 style?: StyleProp<ViewStyle>;
73 /**
74 * @optional
75 */
76 theme: ReactNativePaper.Theme;
77}> & {
78 ({ index, total, style, theme, ...rest }: Props): JSX.Element;
79 displayName: string;
80}, {}>;
81export default _default;
82export { CardCover };