diff --git a/src/Dialog/Content/Panel.tsx b/src/Dialog/Content/Panel.tsx index d8caf667..fb53ace7 100644 --- a/src/Dialog/Content/Panel.tsx +++ b/src/Dialog/Content/Panel.tsx @@ -118,8 +118,9 @@ const Panel = React.forwardRef((props, ref) => { onClick={onClose} aria-label="Close" {...ariaProps} - className={`${prefixCls}-close`} + className={clsx(`${prefixCls}-close`, modalClassNames?.close)} disabled={closeBtnIsDisabled} + style={modalStyles?.close} > {closableObj.closeIcon} diff --git a/src/IDialogPropTypes.ts b/src/IDialogPropTypes.ts index ffe86471..e39b1616 100644 --- a/src/IDialogPropTypes.ts +++ b/src/IDialogPropTypes.ts @@ -1,7 +1,7 @@ import type { GetContainer } from '@rc-component/util/lib/PortalWrapper'; import type { CSSProperties, ReactNode, SyntheticEvent } from 'react'; -export type SemanticName = 'header' | 'body' | 'footer' | 'container' | 'title' | 'wrapper' | 'mask'; +export type SemanticName = 'header' | 'body' | 'footer' | 'container' | 'title' | 'wrapper' | 'mask' | 'close'; export type ModalClassNames = Partial>; diff --git a/tests/__snapshots__/index.spec.tsx.snap b/tests/__snapshots__/index.spec.tsx.snap index dc679362..d1c0daf5 100644 --- a/tests/__snapshots__/index.spec.tsx.snap +++ b/tests/__snapshots__/index.spec.tsx.snap @@ -111,7 +111,7 @@ exports[`dialog should support classNames 1`] = ` >