Skip to content

Commit 651e413

Browse files
authored
Update toast placement to bottom center (#5107)
1 parent 15721e5 commit 651e413

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/@react-spectrum/toast/src/Toaster.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
import {AriaToastRegionProps, useToastRegion} from '@react-aria/toast';
14-
import {classNames, useIsMobileDevice} from '@react-spectrum/utils';
14+
import {classNames} from '@react-spectrum/utils';
1515
import {FocusRing} from '@react-aria/focus';
1616
import {Provider} from '@react-spectrum/provider';
1717
import React, {ReactElement, ReactNode, useRef} from 'react';
@@ -29,7 +29,6 @@ export function Toaster(props: ToastContainerProps): ReactElement {
2929
children,
3030
state
3131
} = props;
32-
let containerPlacement = useIsMobileDevice() ? 'center' : 'right';
3332

3433
let ref = useRef();
3534
let {regionProps} = useToastRegion(props, state, ref);
@@ -41,7 +40,7 @@ export function Toaster(props: ToastContainerProps): ReactElement {
4140
{...regionProps}
4241
ref={ref}
4342
data-position="bottom"
44-
data-placement={containerPlacement}
43+
data-placement="center"
4544
className={classNames(
4645
toastContainerStyles,
4746
'react-spectrum-ToastContainer'

0 commit comments

Comments
 (0)