mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 09:49:57 +08:00
5d9cb2e50d
* refactor: Optimize theme export and add docs * chore: fix lint * chore: fix lint * chore: fix lint
25 lines
855 B
TypeScript
25 lines
855 B
TypeScript
import type { AliasToken, GenerateStyle } from '../../theme/internal';
|
|
import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook';
|
|
|
|
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;
|