reactjs - 如何在情感中使用 Antd 主题变量
问题描述
我在 Next.js 网站中使用 Antd 和情感。我希望能够访问组件内的 Antd 主题变量(用 Less 编写)。像这样的东西:
const StyledButton = styled(Button)`
background-color: @primary-color
`
做了一些研究,发现这个问题Using Ant Design Variables in Styled Components但它对我不起作用。此外,样式现在已被弃用。
谢谢
解决方案
推荐阅读
- php - PHP 货币格式在不同服务器上返回带/不带货币前缀的字符串
- marklogic - 未使用 MarkLogic SQL 排序规则
- java - 将 spring 应用程序发布到 tomcat 服务器显示在 Eclipse STS 中找不到的文件
- python - 通过保持格式化 Python 翻译 pdf 文件
- php - Laravel ORM 选择和 whereBetween
- php - 我在命名空间和 php 中的“use”语句中有错误
- kubernetes - Kubernetes 中的 RBAC 错误
- c - 结构和联合中的访问元素
- swift - 处理 iCloud 用户更改
- php - Laravel - 反向多态关系