Skip to content

Commit

Permalink
chore(MessageBar): roll back deprecations of MessageBarTransitionContext
Browse files Browse the repository at this point in the history
- based on code review
  • Loading branch information
robertpenner committed Dec 13, 2024
1 parent d4bfcac commit 551a4a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ export type MessageBarTitleSlots = {
// @public
export type MessageBarTitleState = ComponentState<MessageBarTitleSlots>;

// @internal @deprecated (undocumented)
// @internal (undocumented)
export const messageBarTransitionContextDefaultValue: MessageBarTransitionContextValue;

// @internal @deprecated
// @internal
export const MessageBarTransitionContextProvider: React_2.Provider<MessageBarTransitionContextValue | undefined>;

// @public @deprecated (undocumented)
// @public (undocumented)
export type MessageBarTransitionContextValue = {
className: string;
nodeRef: React_2.Ref<HTMLDivElement | null>;
Expand Down Expand Up @@ -210,7 +210,7 @@ export const useMessageBarTitle_unstable: (props: MessageBarTitleProps, ref: Rea
// @public
export const useMessageBarTitleStyles_unstable: (state: MessageBarTitleState) => MessageBarTitleState;

// @internal @deprecated (undocumented)
// @internal (undocumented)
export const useMessageBarTransitionContext: () => MessageBarTransitionContextValue;

// (No @packageDocumentation comment for this package)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as React from 'react';

/**
* @deprecated Code is unused, replaced by motion components
*/
export type MessageBarTransitionContextValue = {
/**
* @deprecated CSS className is no longer used for this transition, replaced by motion components
*/
className: string;
nodeRef: React.Ref<HTMLDivElement | null>;
};
Expand All @@ -12,22 +12,19 @@ const messageBarTransitionContext = React.createContext<MessageBarTransitionCont

/**
* @internal
* @deprecated Code is unused, replaced by motion components
*/
export const messageBarTransitionContextDefaultValue: MessageBarTransitionContextValue = {
className: '',
nodeRef: React.createRef<HTMLDivElement | null>(),
};

/**
* Context to pass animation className to MessageBar components
* Context to pass nodeRef for animation to MessageBar components
* @internal
* @deprecated Code is unused, replaced by motion components
*/
export const MessageBarTransitionContextProvider = messageBarTransitionContext.Provider;
/**
* @internal
* @deprecated Code is unused, replaced by motion components
*/
export const useMessageBarTransitionContext = () =>
React.useContext(messageBarTransitionContext) ?? messageBarTransitionContextDefaultValue;

0 comments on commit 551a4a4

Please sign in to comment.