Files
react-native-web/docs/storybook/1-components/Image/helpers.js
2017-06-29 16:15:51 -07:00

31 lines
583 B
JavaScript

/**
* @flow
*/
// import React from 'react';
import { StyleSheet } from 'react-native';
const createUncachedURI = source => {
const helper = str => `${str}?t=${Date.now()}`;
const uri = typeof source === 'string' ? source : source.uri;
return typeof source === 'string' ? helper(uri) : { ...source, uri: helper(uri) };
};
const styles = StyleSheet.create({
base: {
height: 38,
width: 38
},
row: {
flexDirection: 'row'
},
centerRow: {
alignItems: 'center'
},
marginLeft: {
marginLeft: '1rem'
}
});
export { createUncachedURI, styles };