ant-design / antd-style

css-in-js library with antd v5 token system
https://ant-design.github.io/antd-style/
MIT License
189 stars 29 forks source link

🧐[问题] 请问一下如何给antd-style 扩展 CustomToken 对象类型定义 #16

Closed qc-z closed 1 year ago

qc-z commented 1 year ago

🧐 问题描述

按照作者的文档写了如下代码

💻 示例代码

image 报错如下 image

🚑 其他信息

我在每个组件里面都这样子定义,请问这是错误的写法吗

arvinxx commented 1 year ago

不能用 type 需要用 interface。

我在每个组件里面都这样子定义,请问这是错误的写法吗

这个只需全局定义一次不需要在每个组件中重复声明。

arvinxx commented 1 year ago

已在文档中补充,commit