ant-design/components/space/style/compact.tsx
MadCcc 5d9cb2e50d
refactor: Optimize theme export and add docs (#38902)
* refactor: Optimize theme export and add docs

* chore: fix lint

* chore: fix lint

* chore: fix lint
2022-11-23 20:22:38 +08:00

30 lines
726 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;