Skip to content

Commit 8a9453c

Browse files
committed
fix(Dialog): Classnames wasn't merged if set
1 parent ecceb97 commit 8a9453c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

react/Dialog/index.jsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
import { default as MUIDialog } from '@material-ui/core/Dialog'
2+
import cx from 'classnames'
23
import React from 'react'
34

45
import { useDialogEffects } from './DialogEffects'
56
import { useCozyTheme } from '../providers/CozyTheme'
67

7-
const Dialog = props => {
8+
const Dialog = ({ className, ...props }) => {
89
const { type, variant } = useCozyTheme()
910

1011
useDialogEffects(props.open, props.fullScreen)
1112

12-
return <MUIDialog className={`CozyTheme--${type}-${variant}`} {...props} />
13+
return (
14+
<MUIDialog
15+
className={cx(`CozyTheme--${type}-${variant}`, className)}
16+
{...props}
17+
/>
18+
)
1319
}
1420

1521
Dialog.defaultProps = {

0 commit comments

Comments
 (0)