antd4-theme-vars
Version:
Generate different theme files for antd@4.x
18 lines (17 loc) • 881 B
TypeScript
import { DefineConfigType, ThemeConfig } from "./types";
import { Root } from "postcss";
export declare function uniqueThemeConfigs(themes: ThemeConfig[]): ThemeConfig[];
/**
* 生成一个过滤 Ant Design 全局样式的 PostCSS 插件
* @param options 配置对象,包含以下属性:
* - prefixCls: string,指定 Ant Design 组件的前缀Cls,用于识别和过滤相关样式
* @returns 返回一个具有 PostCSS 插件功能的对象,该对象在处理 CSS 根节点时,会移除不包含指定前缀Cls的规则
*/
export declare function filterAntdGlobalStylePlugin(options: {
prefixCls: string;
}): {
postcssPlugin: string;
Root(root: Root): void;
};
export declare function outputThemeFile(themeConfig: ThemeConfig, globalConfig: DefineConfigType): Promise<void>;
export default function generate(config: DefineConfigType): Promise<void>;