Skip to content

Commit

Permalink
feat: retire deprecated api (#65)
Browse files Browse the repository at this point in the history
* feat: retire deprecated api

* chore: update test code
  • Loading branch information
aojunhao123 authored Feb 18, 2025
1 parent c5bfc19 commit 95d08da
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/CSSMotion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ export type CSSMotionConfig =
| boolean
| {
transitionSupport?: boolean;
/** @deprecated, no need this anymore since `rc-motion` only support latest react */
forwardRef?: boolean;
};

export type MotionName =
Expand Down
2 changes: 0 additions & 2 deletions tests/CSSMotion.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import RefCSSMotion, {
describe('CSSMotion', () => {
const CSSMotion = genCSSMotion({
transitionSupport: true,
forwardRef: false,
});

beforeEach(() => {
Expand Down Expand Up @@ -613,7 +612,6 @@ describe('CSSMotion', () => {
it('no transition', () => {
const NoCSSTransition = genCSSMotion({
transitionSupport: false,
forwardRef: false,
});

const { container } = render(
Expand Down
1 change: 0 additions & 1 deletion tests/CSSMotionList.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ describe('CSSMotionList', () => {
it('with motion support', () => {
const CSSMotion = genCSSMotion({
transitionSupport: true,
forwardRef: false,
});
const CSSMotionList = genCSSMotionList(true, CSSMotion);
testMotion(CSSMotionList, container => {
Expand Down
3 changes: 0 additions & 3 deletions tests/StrictMode.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import { fireEvent, render } from '@testing-library/react';
import classNames from 'classnames';
import React from 'react';
import { act } from 'react-dom/test-utils';
// import type { CSSMotionProps } from '../src/CSSMotion';
import { genCSSMotion, type CSSMotionRef } from '../src/CSSMotion';
// import RefCSSMotion, { genCSSMotion } from '../src/CSSMotion';
// import ReactDOM from 'react-dom';

describe('StrictMode', () => {
const CSSMotion = genCSSMotion({
Expand Down

0 comments on commit 95d08da

Please sign in to comment.