-
-
Notifications
You must be signed in to change notification settings - Fork 51k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Preset status color into Tag #19399
Conversation
Deploy preview for ant-design ready! Built with commit 32daaa6 |
|
加一下设计稿,另外目前看没看出来这个 status 和 color 的区别。 |
相当于预设的 |
是的,其实是status到color的映射。 |
其实本质是没区别,你用color属性也能做到同样的效果,但用status属性是预置了颜色的,特指用于表示状态的场景。类似badge的status。 |
感觉 |
components/tag/demo/status.md
Outdated
--- | ||
order: 7 | ||
title: | ||
zh-CN: 状态Tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
预设状态的标签
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
这里经过线下讨论,不加 |
Use |
Codecov Report
@@ Coverage Diff @@
## 4.0-prepare #19399 +/- ##
===============================================
+ Coverage 97.75% 97.75% +<.01%
===============================================
Files 284 284
Lines 7393 7395 +2
Branches 2060 2015 -45
===============================================
+ Hits 7227 7229 +2
Misses 166 166
Continue to review full report at Codecov.
|
components/_util/colors.ts
Outdated
@@ -1,5 +1,7 @@ | |||
import { tuple } from './type'; | |||
|
|||
// 预设的状态颜色类型 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
English comment pls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
English comment pls
fixed
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
Sometimes tag component can be used to indicate status. The existing tag cannot be set by color property to achieve the design below. so preset status color to enhance tag component. We preset five different colors, you can set color property such as
success
,processing
,error
,default
andwarning
to indicate specific status.📝 Changelog
☑️ Self Check before Merge
View rendered components/tag/demo/status.md
View rendered components/tag/index.zh-CN.md