File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,7 @@ class Image extends PureComponent<Props, State> {
259259 intensity = { overlayIntensity }
260260 color = { overlayColor }
261261 customContent = { customOverlayContent }
262+ borderRadius = { others ?. borderRadius }
262263 />
263264 ) }
264265 </ ImageView >
Original file line number Diff line number Diff line change 11import { isUndefined } from 'lodash' ;
22import React , { PureComponent } from 'react' ;
3- import { StyleSheet , Image , ImageSourcePropType } from 'react-native' ;
3+ import { StyleSheet , Image , ImageProps , ImageSourcePropType } from 'react-native' ;
44import { Colors } from '../../style' ;
55import View from '../view' ;
66
@@ -23,7 +23,7 @@ export enum OverlayIntensityType {
2323
2424export type OverlayTypeType = typeof OVERLY_TYPES [ keyof typeof OVERLY_TYPES ] ;
2525
26- export type OverlayTypes = {
26+ export type OverlayTypes = Pick < ImageProps , 'borderRadius' > & {
2727 /**
2828 * The type of overlay to set on top of the image
2929 */
@@ -88,7 +88,8 @@ class Overlay extends PureComponent<OverlayTypes> {
8888 } ;
8989
9090 renderImage = ( style : any , source : ImageSourcePropType ) => {
91- return < Image style = { [ styles . container , style ] } resizeMode = { 'stretch' } source = { source } /> ;
91+ const { borderRadius} = this . props ;
92+ return < Image style = { [ styles . container , style ] } resizeMode = { 'stretch' } source = { source } borderRadius = { borderRadius } /> ;
9293 } ;
9394
9495 getImageSource = ( type ?: OverlayTypeType , intensity ?: OverlayTypes [ 'intensity' ] ) => {
You can’t perform that action at this time.
0 commit comments