mirror of
https://github.com/antd-tiny-vue/antd-tiny-vue.git
synced 2024-11-15 00:09:14 +08:00
30 lines
717 B
TypeScript
30 lines
717 B
TypeScript
import type { FullToken, GenerateStyle } from '../../theme/internal'
|
|
/** Component only token. Which will handle additional calculation of alias token */
|
|
export interface ComponentToken {
|
|
// Component token here
|
|
}
|
|
|
|
interface SpaceToken extends FullToken<'Space'> {
|
|
// Custom token here
|
|
}
|
|
|
|
const genSpaceCompactStyle: GenerateStyle<SpaceToken> = (token) => {
|
|
const { componentCls } = token
|
|
|
|
return {
|
|
[componentCls]: {
|
|
display: 'inline-flex',
|
|
'&-block': {
|
|
display: 'flex',
|
|
width: '100%'
|
|
},
|
|
'&-vertical': {
|
|
flexDirection: 'column'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// ============================== Export ==============================
|
|
export default genSpaceCompactStyle
|