-
-
Notifications
You must be signed in to change notification settings - Fork 49.4k
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: add styles props to support Badge wrapper style #48169
base: feature
Are you sure you want to change the base?
Conversation
Run & review this pull request in StackBlitz Codeflow. |
👁 Visual Regression Report for PR #48169 Failed ❌
Check Full Report for details |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature #48169 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 744 744
Lines 12896 12896
Branches 3382 3382
=========================================
Hits 12896 12896 ☔ View full report in Codecov by Sentry. |
|
文档&测试用例需要补一下 |
<div>custom styles</div> | ||
</Badge.Ribbon>, | ||
); | ||
expect(container).toMatchSnapshot(); |
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.
这里不用留快照,用 toHaveStyle 断言就好了,参考其它地方
components/badge/index.zh-CN.md
Outdated
@@ -63,6 +63,12 @@ group: 数据展示 | |||
| placement | 缎带的位置,`start` 和 `end` 随文字方向(RTL 或 LTR)变动 | `start` \| `end` | `end` | | | |||
| text | 缎带中填入的内容 | ReactNode | - | | | |||
|
|||
### `styles` 属性 | |||
|
|||
| 名称 | 说明 | |
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.
加上默认值和版本,另外要在 Badge.Ribbon 那一栏加上 styles
|
||
| Property | Description | Version | | ||
| -------- | ------------------------------------- | ------- | | ||
| body | The style of Ribbon Wrapper Container | 5.16.0 | |
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.
5.16.0 已经发布了,这里应该是 5.17.0
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.
另外这个命名可能还需要在讨论一下
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
#48089
💡 Background and solution
Can't set wrapper of Badge Ribbon's style
Although we can currently set the style of
Badge.Ribbon
, the style is applied to the inner element of the wrapper, not the wrapper itself.📝 Changelog
☑️ Self-Check before Merge