Skip to content

Commit

Permalink
chore(utils): removed InteractionModeListener alias
Browse files Browse the repository at this point in the history
UserInteractionModeListener is the correct name

BREAKING CHANGE: Removed `InteractionModeListener` since it was an alias for `UserInteractionModeListener`
  • Loading branch information
mlaursen committed Aug 12, 2021
1 parent 01c9350 commit 216c8ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
6 changes: 3 additions & 3 deletions packages/form/src/slider/__tests__/Slider.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { ReactElement } from "react";
import { act, fireEvent, render, waitFor } from "@testing-library/react";
import { Dir, InteractionModeListener } from "@react-md/utils";
import { Dir, UserInteractionModeListener } from "@react-md/utils";

import { Slider, SliderProps } from "../Slider";
import { SliderStepOptions, SliderValue } from "../types";
Expand Down Expand Up @@ -395,9 +395,9 @@ describe("Slider", () => {
describe("discrete sliders", () => {
function DiscreteTest({ disabled }: { disabled?: boolean }): ReactElement {
return (
<InteractionModeListener>
<UserInteractionModeListener>
<Test discrete disabled={disabled} />
</InteractionModeListener>
</UserInteractionModeListener>
);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/layout/src/__tests__/LayoutMain.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ReactElement } from "react";
import { InteractionModeListener } from "@react-md/utils";
import { UserInteractionModeListener } from "@react-md/utils";
import {
act,
render as baseRender,
Expand All @@ -12,7 +12,7 @@ const render = (ui: ReactElement, options?: RenderOptions) =>
baseRender(ui, {
...options,
wrapper: ({ children }) => (
<InteractionModeListener>{children}</InteractionModeListener>
<UserInteractionModeListener>{children}</UserInteractionModeListener>
),
});

Expand Down
6 changes: 0 additions & 6 deletions packages/utils/src/mode/UserInteractionModeListener.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ export function UserInteractionModeListener({
);
}

/**
* @deprecated Use the `UserInteractionModeListener` component instead.
* @remarks \@since 2.6.0
*/
export const InteractionModeListener = UserInteractionModeListener;

/* istanbul ignore next */
if (process.env.NODE_ENV !== "production") {
modeContext.displayName = "UserInteractionMode";
Expand Down

0 comments on commit 216c8ef

Please sign in to comment.