ant-design/components/app/style/index.ts
lijianan 684bb15258
feat: App support cssVar (#45806)
* feat: App support cssVar

* fix: fix

* fix: fix

* Apply suggestions from code review

Signed-off-by: MadCcc <1075746765@qq.com>

* Update components/app/style/index.ts

Signed-off-by: MadCcc <1075746765@qq.com>

---------

Signed-off-by: MadCcc <1075746765@qq.com>
Co-authored-by: MadCcc <madccc@foxmail.com>
2023-11-13 15:34:37 +08:00

25 lines
802 B
TypeScript

import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal';
import { genComponentStyleHook } from '../../theme/internal';
export type ComponentToken = {};
interface AppToken extends FullToken<'App'> {}
// =============================== Base ===============================
const genBaseStyle: GenerateStyle<AppToken> = (token) => {
const { componentCls, colorText, fontSize, lineHeight, fontFamily } = token;
return {
[componentCls]: {
color: colorText,
fontSize,
lineHeight,
fontFamily,
},
};
};
export const prepareComponentToken: GetDefaultToken<'App'> = () => ({});
// ============================== Export ==============================
export default genComponentStyleHook<'App'>('App', genBaseStyle, prepareComponentToken);