Skip to content
This repository was archived by the owner on May 29, 2020. It is now read-only.

Flexibility resizeMode by props in ImageComponent #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Slideshow.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export default class Slideshow extends Component {
<View key={index}>
<Image
source={imageObject}
style={{height, width}}/>
style={{height, width, resizeMode: this.props.resizeMode}}/>
{textComponent}
</View>
);
Expand All @@ -212,7 +212,7 @@ export default class Slideshow extends Component {
<View style={styles.overlay}>
<Image
source={imageObject}
style={{height, width}}/>
style={{height, width, resizeMode: this.props.resizeMode}}/>
</View>
{textComponent}
</View>
Expand Down Expand Up @@ -314,6 +314,7 @@ Slideshow.defaultProps = {
indicatorSelectedColor: '#FFFFFF',
scrollEnabled: true,
arrowSize: 16,
resizeMode: 'cover',
}

Slideshow.propTypes = {
Expand All @@ -334,7 +335,8 @@ Slideshow.propTypes = {
arrowLeft: PropTypes.object,
arrowRight: PropTypes.object,
onPress: PropTypes.func,
onPositionChanged: PropTypes.func,
onPositionChanged: PropTypes.func,
resizeMode: PropTypes.string,
};

const setIndicatorSize = function (size) {
Expand Down