Skip to content

Commit

Permalink
fix: Modal conflicting props classNames.wrapper and centered (#47076)
Browse files Browse the repository at this point in the history
* fix: conflict wrapper and centered

* test: update snap

* fix: undefined className

* refactor: use classNames for merge class
  • Loading branch information
sunsunmonkey authored and MadCcc committed Jan 29, 2024
1 parent e02b2ea commit 136fe93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ const Modal: React.FC<ModalProps> = (props) => {
className={classNames(hashId, className, modal?.className)}
style={{ ...modal?.style, ...style }}
classNames={{
wrapper: wrapClassNameExtended,
...modal?.classNames,
...modalClassNames,
wrapper: classNames(wrapClassNameExtended, modalClassNames?.wrapper),
}}
styles={{
...modal?.styles,
Expand Down
2 changes: 1 addition & 1 deletion components/modal/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export interface ModalProps extends ModalCommonProps {
transitionName?: string;
className?: string;
rootClassName?: string;
classNames?: Omit<NonNullable<DialogProps['classNames']>, 'wrapper'>;
classNames?: NonNullable<DialogProps['classNames']>;
getContainer?: string | HTMLElement | getContainerFunc | false;
zIndex?: number;
/** @deprecated Please use `styles.body` instead */
Expand Down

0 comments on commit 136fe93

Please sign in to comment.