File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -173,10 +173,14 @@ const Card = (props: NotificationCardProps): ReactElement => {
173173 < Text numberOfLines = { 2 } style = { [ styles . cardTitle , style . cardTitle ] } >
174174 { notification . message ?. header }
175175 </ Text >
176- { ! hideDelete &&
177- ( deleteIcon || (
178- < CloseIcon onDelete = { onDeleteItem } notification = { notification } styles = { styles } />
179- ) ) }
176+ { ! hideDelete && (
177+ < CloseIcon
178+ onDelete = { onDeleteItem }
179+ customIcon = { deleteIcon }
180+ notification = { notification }
181+ styles = { styles }
182+ />
183+ ) }
180184 </ View >
181185 { Boolean ( notification . message ?. subHeader ) && (
182186 < Text numberOfLines = { 2 } style = { [ style . cardSubTitle , styles . cardSubTitle ] } >
Original file line number Diff line number Diff line change @@ -8,10 +8,12 @@ import type { StyleProps } from '../types';
88const CloseIcon = ( {
99 notification,
1010 styles,
11+ customIcon,
1112 onDelete
1213} : {
1314 notification : NotificationDataType ;
1415 styles : Partial < StyleProps > ;
16+ customIcon ?: ReactElement | null ;
1517 onDelete : ( id : string ) => void ;
1618} ) : ReactElement => {
1719 const icon : JSX . Element [ ] = [ ] ;
@@ -36,7 +38,7 @@ const CloseIcon = ({
3638 testID = 'delete-button'
3739 accessibilityLabel = { `siren-notification-delete${ notification . id } ` }
3840 >
39- < > { icon } </ >
41+ < > { customIcon || icon } </ >
4042 </ TouchableOpacity >
4143 ) ;
4244} ;
You can’t perform that action at this time.
0 commit comments