mirror of
https://github.com/antd-tiny-vue/antd-tiny-vue.git
synced 2025-12-14 01:18:54 +08:00
feat: add theme and style
This commit is contained in:
19
components/theme/themes/shared/genCommonMapToken.ts
Normal file
19
components/theme/themes/shared/genCommonMapToken.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { CommonMapToken, SeedToken } from '../../interface'
|
||||
import genRadius from './genRadius'
|
||||
|
||||
export default function genCommonMapToken(token: SeedToken): CommonMapToken {
|
||||
const { motionUnit, motionBase, borderRadius, lineWidth } = token
|
||||
|
||||
return {
|
||||
// motion
|
||||
motionDurationFast: `${(motionBase + motionUnit).toFixed(1)}s`,
|
||||
motionDurationMid: `${(motionBase + motionUnit * 2).toFixed(1)}s`,
|
||||
motionDurationSlow: `${(motionBase + motionUnit * 3).toFixed(1)}s`,
|
||||
|
||||
// line
|
||||
lineWidthBold: lineWidth + 1,
|
||||
|
||||
// radius
|
||||
...genRadius(borderRadius)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user