diff --git a/src/Dialog/Content/Panel.tsx b/src/Dialog/Content/Panel.tsx index 973a7222..ba0eadfc 100644 --- a/src/Dialog/Content/Panel.tsx +++ b/src/Dialog/Content/Panel.tsx @@ -131,8 +131,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.tsx b/src/IDialogPropTypes.tsx index 9a019733..4c0c2241 100644 --- a/src/IDialogPropTypes.tsx +++ b/src/IDialogPropTypes.tsx @@ -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 8c47cc1e..7233d24e 100644 --- a/tests/__snapshots__/index.spec.tsx.snap +++ b/tests/__snapshots__/index.spec.tsx.snap @@ -133,7 +133,7 @@ exports[`dialog should support classNames 1`] = ` >