({
style,
source,
variant = 'image',
theme: themeOverrides,
}: Props)
| 39 | * ``` |
| 40 | */ |
| 41 | const ListImage = ({ |
| 42 | style, |
| 43 | source, |
| 44 | variant = 'image', |
| 45 | theme: themeOverrides, |
| 46 | }: Props) => { |
| 47 | const theme = useInternalTheme(themeOverrides); |
| 48 | const getStyles = () => { |
| 49 | if (variant === 'video') { |
| 50 | if (!theme.isV3) { |
| 51 | return [style, styles.video]; |
| 52 | } |
| 53 | |
| 54 | return [style, styles.videoV3]; |
| 55 | } |
| 56 | |
| 57 | return [style, styles.image]; |
| 58 | }; |
| 59 | |
| 60 | return ( |
| 61 | <Image |
| 62 | style={getStyles()} |
| 63 | source={source} |
| 64 | accessibilityIgnoresInvertColors |
| 65 | testID="list-image" |
| 66 | /> |
| 67 | ); |
| 68 | }; |
| 69 | |
| 70 | const styles = StyleSheet.create({ |
| 71 | image: { |
nothing calls this directly
no test coverage detected
searching dependent graphs…