Skip to content

Commit

Permalink
chore(tooltip): removed deprecated props from Tooltipped component
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Removed deprecated props from `Tooltipped` component
  • Loading branch information
mlaursen committed Aug 12, 2021
1 parent 6b7871f commit 6dca9b1
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions packages/tooltip/src/Tooltipped.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import React, {
ReactNode,
} from "react";
import { RenderConditionalPortalProps } from "@react-md/portal";
import { UserInteractionMode } from "@react-md/utils";

import {
DEFAULT_TOOLTIP_DENSE_SPACING,
Expand Down Expand Up @@ -101,21 +100,6 @@ export interface TooltippedProps
* `aria-describedby` and the event handlers will be omitted.
*/
children: ChildElement | ChildrenRenderer;

/** @deprecated \@since 2.8.0 Use `threshold` instead. */
positionThreshold?: number;
/** @deprecated \@since 2.8.0 */
tooltipId?: string;
/** @deprecated \@since 2.8.0 */
hoverDelay?: number;
/** @deprecated \@since 2.8.0 */
focusDelay?: number;
/** @deprecated \@since 2.8.0 */
touchTimeout?: number;
/** @deprecated \@since 2.8.0 */
onShow?(mode: UserInteractionMode): void;
/** @deprecated \@since 2.8.0 */
onHide?(): void;
}

/**
Expand All @@ -139,8 +123,7 @@ export function Tooltipped({
spacing = DEFAULT_TOOLTIP_SPACING,
denseSpacing = DEFAULT_TOOLTIP_DENSE_SPACING,
position: propPosition,
positionThreshold,
threshold = positionThreshold ?? DEFAULT_TOOLTIP_THRESHOLD,
threshold = DEFAULT_TOOLTIP_THRESHOLD,
onClick,
onMouseEnter,
onMouseLeave,
Expand All @@ -156,12 +139,6 @@ export function Tooltipped({
disableSwapping,
disableHoverMode,
disableAutoSpacing = process.env.NODE_ENV === "test",
tooltipId: _tooltipId,
hoverDelay: _hoverDelay,
focusDelay: _focusDelay,
touchTimeout: _touchTimeout,
onShow: _onShow,
onHide: _onHide,
...props
}: TooltippedProps): ReactElement {
const { elementProps, tooltipProps } = useTooltip({
Expand Down

0 comments on commit 6dca9b1

Please sign in to comment.