@hideart/react-native-image-cache
Version:
React Native image file system caching for iOS and Android
40 lines (36 loc) • 800 B
text/typescript
import { Dirs } from 'react-native-file-access';
import { StyleSheet } from 'react-native';
export default {
baseDir: `${Dirs.CacheDir}/images_cache/`,
blurRadius: 15,
cacheLimit: 0,
sourceAnimationDuration: 1000,
thumbnailAnimationDuration: 1000,
refreshIntervalHours: 24,
};
export const styles = StyleSheet.create({
container: {
backgroundColor: 'transparent',
overflow: 'hidden',
},
imageStyle: {
bottom: 0,
left: 0,
position: 'absolute',
right: 0,
top: 0,
},
loadingImageStyle: {
alignItems: 'center',
alignSelf: 'center',
bottom: 0,
justifyContent: 'center',
left: 0,
position: 'absolute',
right: 0,
top: 0,
},
});
export const defaultProps = {
onError: (_args: { nativeEvent: { error: any } }) => {},
};