hooks
主题相关
antd 支持了主题配置,我们能够通过配置文件来修改主题。
hooks
- token
ts
import { theme } from "antd";
export const useAntdThemeToken = () => {
const { token } = theme.useToken();
return token;
};
- useColorPrimary
ts
import { theme } from "antd";
export const useColorPrimary = () => {
const { token } = theme.useToken();
return { colorPrimary: token.colorPrimary };
};