Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/examples/formError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Test extends Component {
<div style={{ marginTop: 100, marginLeft: 100, marginBottom: 100 }}>
<Tooltip
visible={this.state.visible}
animation="zoom"
motion={{ motionName: 'rc-tooltip-zoom' }}
trigger={[]}
overlayStyle={{ zIndex: 1000 }}
overlay={<span>required!</span>}
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/onVisibleChange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ function preventDefault(e) {
}

interface TestState {
visible: boolean;
destroy?: boolean;
}
visible: boolean;
destroy?: boolean;
}

class Test extends Component {
state = {
Expand Down Expand Up @@ -37,7 +37,7 @@ class Test extends Component {
<div style={{ marginTop: 300, marginLeft: 100, marginBottom: 100 }}>
<Tooltip
visible={this.state.visible}
animation="zoom"
motion={{ motionName: 'rc-tooltip-zoom' }}
onVisibleChange={this.onVisibleChange}
trigger="click"
overlay={<span>I am a tooltip</span>}
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/simple.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class Test extends Component<any, TestState> {
align={{
offset: [this.state.offsetX, this.state.offsetY],
}}
transitionName={this.state.transitionName}
motion={{ motionName: this.state.transitionName }}
overlayInnerStyle={state.overlayInnerStyle}
>
<div style={{ height: 100, width: 100, border: '1px solid red' }}>trigger</div>
Expand Down
10 changes: 1 addition & 9 deletions src/Tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ArrowType, TriggerProps, TriggerRef } from '@rc-component/trigger';
import Trigger from '@rc-component/trigger';
import type { ActionType, AlignType, AnimationType } from '@rc-component/trigger/lib/interface';
import type { ActionType, AlignType } from '@rc-component/trigger/lib/interface';
import classNames from 'classnames';
import * as React from 'react';
import { forwardRef, useImperativeHandle, useRef } from 'react';
Expand All @@ -25,10 +25,6 @@ export interface TooltipProps
defaultVisible?: boolean;
visible?: boolean;
placement?: string;
/** @deprecated Use `motion` instead */
transitionName?: string;
/** @deprecated Use `motion` instead */
animation?: AnimationType;
/** Config popup motion */
motion?: TriggerProps['popupMotion'];
onVisibleChange?: (visible: boolean) => void;
Expand Down Expand Up @@ -74,8 +70,6 @@ const Tooltip = (props: TooltipProps, ref: React.Ref<TooltipRef>) => {
children,
onVisibleChange,
afterVisibleChange,
transitionName,
animation,
motion,
placement = 'right',
align = {},
Expand Down Expand Up @@ -139,8 +133,6 @@ const Tooltip = (props: TooltipProps, ref: React.Ref<TooltipRef>) => {
getPopupContainer={getTooltipContainer}
onPopupVisibleChange={onVisibleChange}
afterPopupVisibleChange={afterVisibleChange}
popupTransitionName={transitionName}
popupAnimation={animation}
popupMotion={motion}
defaultPopupVisible={defaultVisible}
autoDestroy={destroyTooltipOnHide}
Expand Down
Loading