mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-21 04:48:02 +08:00
24 lines
793 B
TypeScript
24 lines
793 B
TypeScript
import type { AliasToken, GenerateStyle, TokenWithCommonCls } from '../../theme/internal';
|
|
|
|
const genCollapseMotion: GenerateStyle<TokenWithCommonCls<AliasToken>> = (token) => ({
|
|
[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;
|