Skip to content

Commit 0e8d169

Browse files
committed
fix(CCollapse): fix close animation
1 parent 887ceec commit 0e8d169

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/collapse/CCollapse.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { forwardRef, HTMLAttributes, useRef, useState } from 'react'
22
import PropTypes from 'prop-types'
33
import classNames from 'classnames'
4-
import { Transition } from 'react-transition-group'
4+
import { CSSTransition } from 'react-transition-group'
55

66
import { useForkedRef } from '../../utils/hooks'
77

@@ -65,7 +65,7 @@ export const CCollapse = forwardRef<HTMLDivElement, CCollapseProps>(
6565
const _className = classNames(className)
6666

6767
return (
68-
<Transition
68+
<CSSTransition
6969
in={visible}
7070
onEntering={onEntering}
7171
onEntered={onEntered}
@@ -88,7 +88,7 @@ export const CCollapse = forwardRef<HTMLDivElement, CCollapseProps>(
8888
</div>
8989
)
9090
}}
91-
</Transition>
91+
</CSSTransition>
9292
)
9393
},
9494
)

0 commit comments

Comments
 (0)