Skip to content

feat: Add Image component - #1582

Merged
iRoachie merged 1 commit into
nextfrom
fadein-image
Nov 17, 2018
Merged

feat: Add Image component#1582
iRoachie merged 1 commit into
nextfrom
fadein-image

Conversation

@iRoachie

@iRoachie iRoachie commented Nov 17, 2018

Copy link
Copy Markdown
Collaborator

Implements #1478

Motivation

Adds Image component that has support for placeholders. Basically takes out the FadeInImage component that @martinezguillaume wrote in react-native-training/react-native-elements@f8af41c and splits it into it's own component.

A follow-up PR will let the Avatar component use this.

API

import { ActivityIndicator } from 'react-native';
import { Image } from 'react-native-elements';

// Standard Image
<Image
  source={{ uri: image }}
  style={{ width: 200, height: 200 }}
/>


// Image with custom placeholder content
<Image
  source={{ uri: image }}
  style={{ width: 200, height: 200 }}
  PlaceholderContent={<ActivityIndicator />}
/>

Screenshots

img

@codecov

codecov Bot commented Nov 17, 2018

Copy link
Copy Markdown

Codecov Report

Merging #1582 into next will increase coverage by 0.34%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1582      +/-   ##
==========================================
+ Coverage   76.23%   76.58%   +0.34%     
==========================================
  Files          32       33       +1     
  Lines         606      615       +9     
  Branches       78       78              
==========================================
+ Hits          462      471       +9     
  Misses        125      125              
  Partials       19       19
Impacted Files Coverage Δ
src/image/Image.js 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c50243...21e1331. Read the comment docs.

@iRoachie
iRoachie merged commit 3663c0c into next Nov 17, 2018
@iRoachie
iRoachie deleted the fadein-image branch November 17, 2018 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant