Skip to content

Commit 88c7f4e

Browse files
authored
Update toast aria docs (#6468)
* Update toast aria docs
1 parent 1cacbf1 commit 88c7f4e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/@react-aria/toast/docs/useToast.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,13 @@ interface ToastProps<T> extends AriaToastProps<T> {
140140

141141
function Toast<T extends React.ReactNode>({state, ...props}: ToastProps<T>) {
142142
let ref = React.useRef(null);
143-
let {toastProps, titleProps, closeButtonProps} = useToast(props, state, ref);
143+
let {toastProps, contentProps, titleProps, closeButtonProps} = useToast(props, state, ref);
144144

145145
return (
146146
<div {...toastProps} ref={ref} className="toast">
147-
<div {...titleProps}>{props.toast.content}</div>
147+
<div {...contentProps}>
148+
<div {...titleProps}>{props.toast.content}</div>
149+
</div>
148150
<Button {...closeButtonProps}>x</Button>
149151
</div>
150152
);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function useToast<T>(props: AriaToastProps<T>, state: ToastState<T>, ref:
6363

6464
let [isEntered, setIsEntered] = React.useState(false);
6565
useEffect(() => {
66-
if (animation === 'entering') {
66+
if (animation === 'entering' || animation === 'queued') {
6767
setIsEntered(true);
6868
}
6969
}, [animation]);

0 commit comments

Comments
 (0)