react-native-story-component
Version:
Story component for React Native.
28 lines • 674 B
JavaScript
import React from 'react';
import { Image, StyleSheet } from 'react-native';
import { getStatusBarHeight } from 'react-native-safearea-height';
import Computed from '../helpers/Computed';
const StoryImage = _ref => {
let {
onLoadEnd,
height,
width,
source
} = _ref;
return /*#__PURE__*/React.createElement(Image, {
source: source,
style: [styles.image, {
width,
height
}],
onLoadEnd: onLoadEnd
});
};
const styles = StyleSheet.create({
image: {
maxWidth: Computed.DEVICE_WIDTH,
maxHeight: Computed.DEVICE_HEIGHT - getStatusBarHeight(true)
}
});
export default StoryImage;
//# sourceMappingURL=StoryImage.js.map