diff --git a/example/src/components/Card.tsx b/example/src/components/Card.tsx index 2aee951..c411053 100644 --- a/example/src/components/Card.tsx +++ b/example/src/components/Card.tsx @@ -1,41 +1,17 @@ -import { - StyleSheet, - Text, - View, - type ColorValue, - type NativeSyntheticEvent, -} from 'react-native'; +import { StyleSheet, Text, View } from 'react-native'; import React from 'react'; -import TurboImage, { - type CachePolicy, - type Failure, - type Success, - type Start, -} from 'react-native-turbo-image'; +import TurboImage, { type TurboImageProps } from 'react-native-turbo-image'; -type Props = { +interface Props extends Omit { size: number[]; title?: string; - src: string; - cachePolicy?: CachePolicy; - priority?: number; - rounded?: boolean; - monochrome?: number | ColorValue; - borderRadius?: number; - blur?: number; - blurhash?: string; - resize?: number[]; - showActivityIndicator?: boolean; - onStart?: (result: NativeSyntheticEvent) => void; - onSuccess?: (result: NativeSyntheticEvent) => void; - onFailure?: (result: NativeSyntheticEvent) => void; -}; +} const Card = ({ title, size, ...props }: Props) => { return ( {title && {title}} diff --git a/src/index.tsx b/src/index.tsx index b17dd9c..bf3af20 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,3 +1,10 @@ import TurboImage from './TurboImage'; -export type { CachePolicy, Start, Success, Failure, ResizeMode } from './types'; +export type { + CachePolicy, + Start, + Success, + Failure, + ResizeMode, + TurboImageProps, +} from './types'; export default TurboImage;