Permalink
Browse files

Create Flow Props for Image

Reviewed By: yungsters

Differential Revision: D7270057

fbshipit-source-id: 1ecac28e4060fe0e85a4f0698406f8986ae16caf
  • Loading branch information...
TheSavior authored and facebook-github-bot committed Mar 14, 2018
1 parent 6765699 commit 8bac869f5d1f2ef42e707d0ec817afc6ac98b3b2
Showing with 31 additions and 0 deletions.
  1. +31 −0 Libraries/Image/ImageProps.js
@@ -6,6 +6,7 @@
*
* @providesModule ImageProps
* @flow
* @format
*/
'use strict';
@@ -16,6 +17,36 @@ const ImageStylePropTypes = require('ImageStylePropTypes');
const PropTypes = require('prop-types');
const StyleSheetPropType = require('StyleSheetPropType');
import type {ImageSource} from 'ImageSource';
import type {EdgeInsetsProp} from 'EdgeInsetsPropType';
import type {LayoutEvent} from 'CoreEventTypes';
import type {SyntheticEvent} from 'CoreEventTypes';
export type ImageProps = {
accessible?: boolean,
accessibilityLabel?: ?(string | Array<any> | any),
blurRadius?: number,
capInsets?: ?EdgeInsetsProp,
onError?: ?(event: SyntheticEvent<$ReadOnly<{||}>>) => void,
onLayout?: ?(event: LayoutEvent) => void,
onLoad?: ?() => void,
onLoadEnd?: ?() => void,
onLoadStart?: ?() => void,
resizeMethod?: ?('auto' | 'resize' | 'scale'),
resizeMode?: ?('cover' | 'contain' | 'stretch' | 'repeat' | 'center'),
source?: ?ImageSource,
style?: typeof ImageStylePropTypes,
testID?: ?string,
// ios
defaultSource?: ?ImageSource,
onPartialLoad?: ?() => void,
onProgress?: ?(
event: SyntheticEvent<$ReadOnly<{|loaded: number, total: number|}>>,
) => void,
};
module.exports = {
/**
* See https://facebook.github.io/react-native/docs/image.html#style

0 comments on commit 8bac869

Please sign in to comment.