react-native-paper
Version:
Material design for React Native
66 lines (65 loc) • 3.86 kB
TypeScript
import * as React from 'react';
import { ViewStyle, Image, StyleProp } from 'react-native';
declare type Props = React.ComponentPropsWithRef<typeof Image> & {
/**
* @internal
*/
index?: number;
/**
* @internal
*/
total?: number;
style?: StyleProp<ViewStyle>;
/**
* @optional
*/
theme: ReactNativePaper.Theme;
};
/**
* A component to show a cover image inside a Card.
*
* <div class="screenshots">
* <figure>
* <img class="medium" src="screenshots/card-cover.png" />
* </figure>
* </div>
*
* ## Usage
* ```js
* import * as React from 'react';
* import { Card } from 'react-native-paper';
*
* const MyComponent = () => (
* <Card>
* <Card.Cover source={{ uri: 'https://picsum.photos/700' }} />
* </Card>
* );
*
* export default MyComponent;
* ```
*
* @extends Image props https://reactnative.dev/docs/image#props
*/
declare const CardCover: {
({ index, total, style, theme, ...rest }: Props): JSX.Element;
displayName: string;
};
declare const _default: (React.ComponentClass<Pick<Props, "ref" | "source" | "style" | "onLayout" | "testID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "key" | "onError" | "onLoad" | "onLoadEnd" | "onLoadStart" | "progressiveRenderingEnabled" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "resizeMode" | "resizeMethod" | "loadingIndicatorSource" | "defaultSource" | "blurRadius" | "capInsets" | "onProgress" | "onPartialLoad" | "fadeDuration" | "width" | "height" | "index" | "total"> & {
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
}, any> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<(React.ComponentClass<Props, any> & {
({ index, total, style, theme, ...rest }: Props): JSX.Element;
displayName: string;
}) | (React.FunctionComponent<Props> & {
({ index, total, style, theme, ...rest }: Props): JSX.Element;
displayName: string;
}), {}>) | (React.FunctionComponent<Pick<Props, "ref" | "source" | "style" | "onLayout" | "testID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "key" | "onError" | "onLoad" | "onLoadEnd" | "onLoadStart" | "progressiveRenderingEnabled" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "resizeMode" | "resizeMethod" | "loadingIndicatorSource" | "defaultSource" | "blurRadius" | "capInsets" | "onProgress" | "onPartialLoad" | "fadeDuration" | "width" | "height" | "index" | "total"> & {
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<(React.ComponentClass<Props, any> & {
({ index, total, style, theme, ...rest }: Props): JSX.Element;
displayName: string;
}) | (React.FunctionComponent<Props> & {
({ index, total, style, theme, ...rest }: Props): JSX.Element;
displayName: string;
}), {}>);
export default _default;
export { CardCover };