ant-design / antd-style

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

🧐[问题] 怎么理解appearance和themeMode这两个属性的区别? #60

Closed chj-damon closed 1 year ago

chj-damon commented 1 year ago

🧐 问题描述

我在实现明暗模式切换的时候,看文档里面appearancethemeMode这两个都可以做到,想问一下这两个属性是有什么区别吗?否则为什么要单独分开?

💻 示例代码

🚑 其他信息

https://ant-design.github.io/antd-style/guide/switch-theme

chj-damon commented 1 year ago

从表现上来看,当themeMode='dark'的时候,appearance也是dark; themeMode='auto'的时候,appearance=‘dark’ | 'light', 那干嘛还需要appearance这个prop?

arvinxx commented 1 year ago

看下 #52