mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 01:19:45 +08:00
684bb15258
* 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>
25 lines
802 B
TypeScript
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);
|