2024-07-23 17:49:35 +08:00
|
|
|
import type { AliasToken, GenerateStyle, TokenWithCommonCls } from '../../theme/internal';
|
2022-07-19 22:53:38 +08:00
|
|
|
|
2022-11-19 13:47:33 +08:00
|
|
|
const genCollapseMotion: GenerateStyle<TokenWithCommonCls<AliasToken>> = (token) => ({
|
2022-07-19 22:53:38 +08:00
|
|
|
[token.componentCls]: {
|
|
|
|
// For common/openAnimation
|
|
|
|
[`${token.antCls}-motion-collapse-legacy`]: {
|
|
|
|
overflow: 'hidden',
|
|
|
|
|
|
|
|
'&-active': {
|
|
|
|
transition: `height ${token.motionDurationMid} ${token.motionEaseInOut},
|
|
|
|
opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
[`${token.antCls}-motion-collapse`]: {
|
|
|
|
overflow: 'hidden',
|
|
|
|
transition: `height ${token.motionDurationMid} ${token.motionEaseInOut},
|
|
|
|
opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default genCollapseMotion;
|