Skip to content

Commit e0bd74c

Browse files
committed
[@mantine/notifications] Fix notifications with bottom-right and top-right positions shifting when modal/drawer is opened
1 parent 8b2497d commit e0bd74c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

packages/@mantine/notifications/src/Notifications.tsx

+11-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
OptionalPortal,
1616
PortalProps,
1717
rem,
18+
RemoveScroll,
1819
StylesApiProps,
1920
useMantineTheme,
2021
useProps,
@@ -222,11 +223,19 @@ export const Notifications = factory<NotificationsFactory>((_props, ref) => {
222223
<TransitionGroup>{groupedComponents['top-left']}</TransitionGroup>
223224
</Box>
224225

225-
<Box {...getStyles('root')} data-position="top-right" {...others}>
226+
<Box
227+
{...getStyles('root', { className: RemoveScroll.classNames.fullWidth })}
228+
data-position="top-right"
229+
{...others}
230+
>
226231
<TransitionGroup>{groupedComponents['top-right']}</TransitionGroup>
227232
</Box>
228233

229-
<Box {...getStyles('root')} data-position="bottom-right" {...others}>
234+
<Box
235+
{...getStyles('root', { className: RemoveScroll.classNames.fullWidth })}
236+
data-position="bottom-right"
237+
{...others}
238+
>
230239
<TransitionGroup>{groupedComponents['bottom-right']}</TransitionGroup>
231240
</Box>
232241

0 commit comments

Comments
 (0)