File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
packages/design-system/src/components/Modal Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @strapi/design-system ' : minor
3
+ ---
4
+
5
+ fixed Modal Content scroll issues
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import * as Dialog from '@radix-ui/react-dialog';
4
4
import { Cross } from '@strapi/icons' ;
5
5
import { styled } from 'styled-components' ;
6
6
7
+ import { setOpacity } from '../../helpers/setOpacity' ;
7
8
import { ANIMATIONS } from '../../styles/motion' ;
8
9
import { ScrollArea , ScrollAreaProps } from '../../utilities/ScrollArea' ;
9
10
import { Flex , type FlexComponent , type FlexProps } from '../Flex' ;
@@ -41,18 +42,18 @@ interface ContentProps extends Dialog.DialogContentProps {}
41
42
const Content = React . forwardRef < ContentElement , ContentProps > ( ( props , forwardedRef ) => {
42
43
return (
43
44
< Dialog . Portal >
44
- < Overlay />
45
- < ContentImpl ref = { forwardedRef } { ...props } />
45
+ < Overlay >
46
+ < ContentImpl ref = { forwardedRef } { ...props } />
47
+ </ Overlay >
46
48
</ Dialog . Portal >
47
49
) ;
48
50
} ) ;
49
51
50
52
const Overlay = styled ( Dialog . Overlay ) `
51
- background-color : ${ ( props ) => props . theme . colors . neutral800 } ;
53
+ background: ${ ( props ) => setOpacity ( props . theme . colors . neutral800 , 0.2 ) } ;
52
54
position: fixed;
53
55
inset: 0;
54
56
z-index: ${ ( props ) => props . theme . zIndices . overlay } ;
55
- opacity: 0.2;
56
57
57
58
@media (prefers-reduced-motion: no-preference) {
58
59
animation: ${ ANIMATIONS . overlayFadeIn } ${ ( props ) => props . theme . motion . timings [ '200' ] }
You can’t perform that action at this time.
0 commit comments