mirror of
https://github.com/antd-tiny-vue/antd-tiny-vue.git
synced 2025-09-11 00:33:17 +08:00
feat: add theme and style
This commit is contained in:
24
components/style/motion/collapse.ts
Normal file
24
components/style/motion/collapse.ts
Normal file
@ -0,0 +1,24 @@
|
||||
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
|
Reference in New Issue
Block a user