mirror of
https://github.com/status-im/react-native-fast-image.git
synced 2026-08-31 05:41:16 +00:00
fix example
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
"@react-navigation/stack": "^5.1.0",
|
||||
"react": "16.9.0",
|
||||
"react-native": "0.61.5",
|
||||
"react-native-fast-image": "^8.1.3",
|
||||
"react-native-fast-image": "./react-native-fast-image-8.1.9.tgz",
|
||||
"react-native-gesture-handler": "^1.6.0",
|
||||
"react-native-image-picker": "^2.3.1",
|
||||
"react-native-image-progress": "^1.1.1",
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { Component } from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage, { FastImageProps } from 'react-native-fast-image'
|
||||
import { FastImage, FastImageProps } from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import { FastImage } from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import { FastImage } from 'react-native-fast-image'
|
||||
import ImageGrid from './ImageGrid'
|
||||
|
||||
const FastImageGrid = () => <ImageGrid ImageComponent={FastImage} />
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import { FastImage } from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
ViewProps,
|
||||
} from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import FastImage, { FastImageProps, Source } from 'react-native-fast-image'
|
||||
import { FastImage, FastImageProps, Source } from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
import FieldsBase64 from './images/fields'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { Component } from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import { FastImage, preload } from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
import Button from './Button'
|
||||
@@ -33,7 +33,7 @@ class PreloadExample extends Component<PreloadExampleProps> {
|
||||
}
|
||||
|
||||
preload = () => {
|
||||
FastImage.preload([{ uri: this.state.url }])
|
||||
preload([{ uri: this.state.url }])
|
||||
}
|
||||
|
||||
showImage = () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import { PixelRatio, StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import { FastImage } from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FeatureText from './FeatureText'
|
||||
@@ -31,21 +31,21 @@ const PriorityExample = ({ onPressReload, bust }: PriorityExampleProps) => (
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URLS[0] + bust,
|
||||
priority: FastImage.priority.low,
|
||||
priority: 'low'
|
||||
}}
|
||||
/>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URLS[1] + bust,
|
||||
priority: FastImage.priority.normal,
|
||||
priority: 'normal'
|
||||
}}
|
||||
/>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
source={{
|
||||
uri: IMAGE_URLS[2] + bust,
|
||||
priority: FastImage.priority.high,
|
||||
priority: 'high'
|
||||
}}
|
||||
/>
|
||||
</SectionFlex>
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { Component } from 'react'
|
||||
import { StyleSheet, View, Text } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import { FastImage } from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import { FastImage } from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import FeatureText from './FeatureText'
|
||||
import BulletText from './BulletText'
|
||||
@@ -19,7 +19,7 @@ const ResizeModeExample = () => (
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.contain}
|
||||
resizeMode="contain"
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<BulletText>contain</BulletText>
|
||||
@@ -27,7 +27,7 @@ const ResizeModeExample = () => (
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.center}
|
||||
resizeMode="center"
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<BulletText>center</BulletText>
|
||||
@@ -35,7 +35,7 @@ const ResizeModeExample = () => (
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.stretch}
|
||||
resizeMode="stretch"
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<BulletText>stretch</BulletText>
|
||||
@@ -43,7 +43,7 @@ const ResizeModeExample = () => (
|
||||
<Col>
|
||||
<FastImage
|
||||
style={styles.image}
|
||||
resizeMode={FastImage.resizeMode.cover}
|
||||
resizeMode="cover"
|
||||
source={{ uri: IMAGE_URL }}
|
||||
/>
|
||||
<BulletText>cover</BulletText>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, View } from 'react-native'
|
||||
import withCacheBust from './withCacheBust'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import { FastImage } from 'react-native-fast-image'
|
||||
import Section from './Section'
|
||||
import SectionFlex from './SectionFlex'
|
||||
import FeatureText from './FeatureText'
|
||||
|
||||
@@ -5276,10 +5276,9 @@ react-is@^16.12.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.9.0:
|
||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.0.tgz#0f37c3613c34fe6b37cd7f763a0d6293ab15c527"
|
||||
integrity sha512-GFMtL0vHkiBv9HluwNZTggSn/sCyEt9n02aM0dSAjGGyqyNlAyftYm4phPxdvCigG15JreC5biwxCgTAJZ7yAA==
|
||||
|
||||
react-native-fast-image@^8.1.3:
|
||||
version "8.1.3"
|
||||
resolved "https://registry.yarnpkg.com/react-native-fast-image/-/react-native-fast-image-8.1.3.tgz#7320ca54f36f6c3e84c7ee23270b56f228cc28ac"
|
||||
integrity sha512-WJl0I8jgwufoeemqMU01YiV8/xYyIBDk3sZ0IwGBlHFbchP/B6KD+utY8ufhB7Tq4nT7zx0p/0HuhfT8aipySg==
|
||||
react-native-fast-image@./react-native-fast-image-8.1.9.tgz:
|
||||
version "8.1.9"
|
||||
resolved "./react-native-fast-image-8.1.9.tgz#8d79e7fa2291518c3094d41ca39a5bde7431909d"
|
||||
|
||||
react-native-gesture-handler@^1.6.0:
|
||||
version "1.6.0"
|
||||
@@ -5473,12 +5472,7 @@ regenerate@^1.4.0:
|
||||
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"
|
||||
integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==
|
||||
|
||||
regenerator-runtime@^0.13.2:
|
||||
version "0.13.3"
|
||||
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5"
|
||||
integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==
|
||||
|
||||
regenerator-runtime@^0.13.4:
|
||||
regenerator-runtime@^0.13.2, regenerator-runtime@^0.13.4:
|
||||
version "0.13.4"
|
||||
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.4.tgz#e96bf612a3362d12bb69f7e8f74ffeab25c7ac91"
|
||||
integrity sha512-plpwicqEzfEyTQohIKktWigcLzmNStMGwbOUbykx51/29Z3JOGYldaaNGK7ngNXV+UcoqvIMmloZ48Sr74sd+g==
|
||||
|
||||
Reference in New Issue
Block a user