@@ -25,6 +25,7 @@ import { Backdrop } from '../Backdrop'
2525import { Button , ButtonStyleType , ButtonVariantType } from '../Button'
2626import { Confetti } from '../Confetti'
2727import { CustomInput } from '../CustomInput'
28+ import { Icon } from '../Icon'
2829import { useConfirmationModalContext } from './ConfirmationModalContext'
2930import { ConfirmationModalBodyProps , ConfirmationModalProps , ConfirmationModalVariantType } from './types'
3031import { getConfirmationLabel , getIconFromVariant , getPrimaryButtonStyleFromVariant } from './utils'
@@ -34,7 +35,7 @@ import './confirmationModal.scss'
3435const ConfirmationModalBody = ( {
3536 title,
3637 subtitle,
37- Icon,
38+ Icon : ButtonIcon ,
3839 variant,
3940 buttonConfig,
4041 confirmationConfig,
@@ -53,8 +54,8 @@ const ConfirmationModalBody = ({
5354
5455 const { primaryButtonConfig, secondaryButtonConfig } = buttonConfig
5556
56- const RenderIcon = Icon ?? getIconFromVariant ( variant )
57- const hideIcon = variant === ConfirmationModalVariantType . custom && ! Icon
57+ const RenderIcon = ButtonIcon ?? getIconFromVariant ( variant )
58+ const hideIcon = variant === ConfirmationModalVariantType . custom && ! ButtonIcon
5859
5960 const disablePrimaryButton : boolean =
6061 ( 'disabled' in primaryButtonConfig && primaryButtonConfig . disabled ) ||
@@ -159,7 +160,7 @@ const ConfirmationModalBody = ({
159160 text = { primaryButtonConfig . text }
160161 onClick = { primaryButtonConfig . onClick as ButtonHTMLAttributes < HTMLButtonElement > [ 'onClick' ] }
161162 startIcon = { primaryButtonConfig . startIcon }
162- endIcon = { primaryButtonConfig . endIcon }
163+ endIcon = { primaryButtonConfig . endIcon || < Icon name = "ic-key-enter" color = { null } /> }
163164 />
164165 ) }
165166 </ div >
0 commit comments