Skip to content

Commit

Permalink
fix integration with ModalDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Sep 22, 2023
1 parent 4a9dfda commit ac604f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/mui-joy/src/CardOverflow/CardOverflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
import useSlot from '../utils/useSlot';
import buttonClasses from '../Button/buttonClasses';
import cardClasses from '../Card/cardClasses';
import modalDialogClasses from '../ModalDialog/modalDialogClasses';

const useUtilityClasses = (ownerState: CardOverflowOwnerState) => {
const { variant, color } = ownerState;
Expand Down Expand Up @@ -75,7 +76,7 @@ const CardOverflowRoot = styled('div', {
'--Button-radius': '0 var(--CardOverflow-radius) var(--CardOverflow-radius) 0',
},
},
[`.${cardClasses.vertical} > &`]: {
[`.${cardClasses.vertical} > &, .${modalDialogClasses.root} > &`]: {
flexDirection: 'column', // required to make AspectRatio works
'--AspectRatio-margin': '0 calc(-1 * var(--Card-padding))',
'--_CardOverflow-margin': '0 var(--CardOverflow-offset)',
Expand Down

0 comments on commit ac604f3

Please sign in to comment.