You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Image.js 755B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // @flow
  2. import React, { Component } from 'react';
  3. import { Image } from 'react-native';
  4. /**
  5. * The type of the React {@code Component} props of {@link Image}.
  6. */
  7. type Props = {
  8. /**
  9. * The ImageSource to be rendered as image.
  10. */
  11. src: Object,
  12. /**
  13. * The component's external style
  14. */
  15. style: Object
  16. };
  17. /**
  18. * A component rendering aN IMAGE.
  19. *
  20. * @extends Component
  21. */
  22. export default class ImageImpl extends Component<Props> {
  23. /**
  24. * Implements React's {@link Component#render()}.
  25. *
  26. * @inheritdoc
  27. * @returns {ReactElement}
  28. */
  29. render() {
  30. return (
  31. <Image
  32. source = { this.props.src }
  33. style = { this.props.style } />
  34. );
  35. }
  36. }