Skip to content

Commit

Permalink
chore(react-message-bar): Use useAnnounce() instead of the deprecat…
Browse files Browse the repository at this point in the history
…ed `useAnnounce_unstable()` (#33178)

Co-authored-by: Sarah Higley <[email protected]>
  • Loading branch information
emmayjiang and smhigley authored Oct 31, 2024
1 parent c262869 commit a22d8ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore(react-message-bar): Use useAnnounce() instead of the deprecated useAnnounce_unstable()",
"packageName": "@fluentui/react-message-bar",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { getIntrinsicElementProps, slot, useId, useMergedRefs } from '@fluentui/react-utilities';
import { useAnnounce_unstable } from '@fluentui/react-shared-contexts';
import { useAnnounce } from '@fluentui/react-shared-contexts';
import type { MessageBarProps, MessageBarState } from './MessageBar.types';
import { getIntentIcon } from './getIntentIcon';
import { useMessageBarReflow } from './useMessageBarReflow';
Expand All @@ -24,7 +24,7 @@ export const useMessageBar_unstable = (props: MessageBarProps, ref: React.Ref<HT
const { className: transitionClassName, nodeRef } = useMessageBarTransitionContext();
const actionsRef = React.useRef<HTMLDivElement | null>(null);
const bodyRef = React.useRef<HTMLDivElement | null>(null);
const { announce } = useAnnounce_unstable();
const { announce } = useAnnounce();
const titleId = useId();

React.useEffect(() => {
Expand Down

0 comments on commit a22d8ee

Please sign in to comment.