// @ts-ignore Temporarily do not proceed the action package ts import { Transition } from '@douyinfe/semi-animation-react'; import React, { JSXElementConstructor, ReactChildren } from 'react'; import { Motion } from '../_base/base'; interface ContentTransitionProps { // eslint-disable-next-line max-len motion?: Motion; children?: ReactChildren | JSXElementConstructor; controlled?: boolean; visible?: boolean; } export default function ContentTransition(props: ContentTransitionProps = {}) { const { motion: motionFromProps, children, controlled, visible } = props; let motion = motionFromProps; let extra = {}; if (typeof motion === 'function') { motion = motion(props); } else if (!motion || typeof motion !== 'object') { motion = {}; } if (controlled) { extra = { // immediate: true, state: visible ? 'enter' : 'leave', }; } return ( {children} ); }