From c0947001c4ff5d12cfe018fbd8264e4611685033 Mon Sep 17 00:00:00 2001 From: Ivan P Date: Sat, 15 Sep 2018 15:06:15 +0300 Subject: [PATCH] Added a new property for ability to add some custom overlay for ImageCrop component --- src/ImageCrop.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ImageCrop.js b/src/ImageCrop.js index a6deeed..b5a7228 100644 --- a/src/ImageCrop.js +++ b/src/ImageCrop.js @@ -196,6 +196,7 @@ class ImageCrop extends Component { center={[this.state.centerX, this.state.centerY]} /> + {this.props.Overlay} ) } @@ -214,7 +215,8 @@ ImageCrop.defaultProps = { pixelRatio: PixelRatio.get(), type: 'jpg', format: 'base64', - filePath: '' + filePath: '', + Overlay: null, } ImageCrop.propTypes = { image: PropTypes.string.isRequired, @@ -227,6 +229,7 @@ ImageCrop.propTypes = { pixelRatio: PropTypes.number, type: PropTypes.string, format: PropTypes.string, - filePath: PropTypes.string + filePath: PropTypes.string, + Overlay: PropTypes.func, } module.exports=ImageCrop