/* eslint-disable react/jsx-sort-props */ /** * @flow */ import React from 'react'; import PropDefaultSource from './examples/PropDefaultSource'; import PropDraggable from './examples/PropDraggable'; import PropOnError from './examples/PropOnError'; import PropOnLoad from './examples/PropOnLoad'; import PropOnLoadEnd from './examples/PropOnLoadEnd'; import PropOnLoadStart from './examples/PropOnLoadStart'; import PropResizeMode from './examples/PropResizeMode'; import PropSource from './examples/PropSource'; import StaticGetSizeExample from './examples/StaticGetSize'; import StaticPrefetchExample from './examples/StaticPrefetch'; import UIExplorer, { AppText, Code, Description, DocItem, Section, storiesOf } from '../../ui-explorer'; const ImageScreen = () => ( An accessibile image component with support for image resizing, default image, and child content.
An image to display as a placeholder while downloading the final image off the network.{' '} {'{ uri: string, width, height }'} } example={{ render: () => }} /> }} /> Invoked on load error with {'{nativeEvent: {error}}'}. } example={{ render: () => }} /> }} /> }} /> }} /> }} /> uri is a string representing the resource identifier for the image, which could be an http address or a base64 encoded image.{' '} {'{ uri: string, width, height }'} } example={{ render: () => }} />
' }} />
Retrieve the width and height (in pixels) of an image prior to displaying it. This method can fail if the image cannot be found, or fails to download. , (In order to retrieve the image dimensions, the image may first need to be loaded or downloaded, after which it will be cached. This means that in principle you could use this method to preload images, however it is not optimized for that purpose, and may in future be implemented in a way that does not fully load/download the image data.) ]} example={{ render: () => }} /> }} />
); storiesOf('Components', module).add('Image', ImageScreen);