diff --git a/components/doc/common/apidoc/index.json b/components/doc/common/apidoc/index.json index 459447dde1..ed16068fdc 100644 --- a/components/doc/common/apidoc/index.json +++ b/components/doc/common/apidoc/index.json @@ -14946,14 +14946,14 @@ "name": "rejectButton", "optional": true, "readonly": false, - "type": "ButtonPassThroughOptions", + "type": "ConfirmDialogPassThroughType>", "description": "Uses to pass attributes to the Button component." }, { "name": "acceptButton", "optional": true, "readonly": false, - "type": "ButtonPassThroughOptions", + "type": "ConfirmDialogPassThroughType>", "description": "Uses to pass attributes to the Button component." }, { diff --git a/components/lib/confirmdialog/ConfirmDialog.js b/components/lib/confirmdialog/ConfirmDialog.js index 4e13635f87..35ddef6195 100644 --- a/components/lib/confirmdialog/ConfirmDialog.js +++ b/components/lib/confirmdialog/ConfirmDialog.js @@ -154,18 +154,21 @@ export const ConfirmDialog = React.memo( getPropValue('rejectClassName') ); - const rejectButtonProps = { - label: rejectLabel, - autoFocus: defaultFocus === 'reject', - icon: getPropValue('rejectIcon'), - className: classNames(getPropValue('rejectClassName'), cx('rejectButton', { getPropValue })), - onClick: reject, - pt: ptm('rejectButton'), - unstyled: props.unstyled, - __parentMetadata: { - parent: metaData - } - }; + const rejectButtonProps = mergeProps( + { + label: rejectLabel, + autoFocus: defaultFocus === 'reject', + icon: getPropValue('rejectIcon'), + className: classNames(getPropValue('rejectClassName'), cx('rejectButton', { getPropValue })), + onClick: reject, + pt: ptm('rejectButton'), + unstyled: props.unstyled, + __parentMetadata: { + parent: metaData + } + }, + ptm('rejectButton') + ); const acceptButtonProps = mergeProps( { diff --git a/components/lib/confirmdialog/confirmdialog.d.ts b/components/lib/confirmdialog/confirmdialog.d.ts index 03a7f9c151..d4be0f18fb 100644 --- a/components/lib/confirmdialog/confirmdialog.d.ts +++ b/components/lib/confirmdialog/confirmdialog.d.ts @@ -9,7 +9,6 @@ */ import * as React from 'react'; import { CSSTransitionProps as ReactCSSTransitionProps } from 'react-transition-group/CSSTransition'; -import { ButtonPassThroughOptions } from '../button/button'; import { ComponentHooks } from '../componentbase/componentbase'; import { DialogProps } from '../dialog'; import { PassThroughOptions } from '../passthrough'; @@ -73,14 +72,12 @@ export interface ConfirmDialogPassThroughOptions { footer?: ConfirmDialogPassThroughType>; /** * Uses to pass attributes to the Button component. - * @see {@link ButtonPassThroughOptions} */ - rejectButton?: ButtonPassThroughOptions; + rejectButton?: ConfirmDialogPassThroughType>; /** * Uses to pass attributes to the Button component. - * @see {@link ButtonPassThroughOptions} */ - acceptButton?: ButtonPassThroughOptions; + acceptButton?: ConfirmDialogPassThroughType>; /** * Used to manage all lifecycle hooks * @see {@link ComponentHooks}