Skip to content

Commit 67c8dcc

Browse files
committed
Code review suggestion
1 parent 44230a8 commit 67c8dcc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/@react-aria/toast/src/useToast.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import {AriaButtonProps} from '@react-types/button';
1414
import {AriaLabelingProps, DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';
15-
import {filterDOMProps, mergeProps, useId, useSlotId} from '@react-aria/utils';
15+
import {filterDOMProps, useId, useSlotId} from '@react-aria/utils';
1616
// @ts-ignore
1717
import intlMessages from '../intl/*.json';
1818
import {QueuedToast, ToastState} from '@react-stately/toast';
@@ -75,13 +75,14 @@ export function useToast<T>(props: AriaToastProps<T>, state: ToastState<T>, ref:
7575
let toastProps = filterDOMProps(props, {labelable: true});
7676

7777
return {
78-
toastProps: mergeProps(toastProps, {
78+
toastProps: {
79+
...toastProps,
7980
role: 'alertdialog',
8081
'aria-modal': 'false',
8182
'aria-labelledby': props['aria-labelledby'] || titleId,
8283
'aria-describedby': props['aria-describedby'] || descriptionId,
8384
tabIndex: 0
84-
} as const),
85+
},
8586
contentProps: {
8687
role: 'alert',
8788
'aria-atomic': 'true',

0 commit comments

Comments
 (0)