-
-
Notifications
You must be signed in to change notification settings - Fork 50.2k
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(tooltip): Tooltip support colour background #23155
Conversation
@afc163 需要支持自定义的颜色吗?这样的话可能得改动 |
自定义颜色参考 Tag 组件。 |
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. Latest deployment of this branch, based on commit 9f5853d00d0ee9bf7f0aa61189dc1c13f17b5165:
|
feature branch |
Conflict |
这个还没合呢 |
|
需要改成 feature branch |
9f5853d
to
e851c0c
Compare
/rebase |
e851c0c
to
61cc77a
Compare
为啥 dist 老是挂,rebase 一下 feature 试试。 |
已经是 rebase 过 feature 了的。 |
components/tooltip/demo/colorful.md
Outdated
const customColors = ['#f50', '#2db7f5', '#87d068', '#108ee9']; | ||
|
||
ReactDOM.render( | ||
<div> |
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.
<div> | |
<> |
components/tooltip/demo/colorful.md
Outdated
|
||
ReactDOM.render( | ||
<div> | ||
<h4 style={{ marginBottom: 16 }}>Presets:</h4> |
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.
用 Divider
components/badge/demo/colorful.md
Outdated
@@ -34,15 +34,15 @@ const colors = [ | |||
|
|||
ReactDOM.render( | |||
<div> |
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.
<div> | |
<> |
<div> | ||
<h4 style={{ marginBottom: 16 }}>Presets:</h4> | ||
<> | ||
<Divider orientation="left">Presets</Divider> |
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.
snapshot 要更新掉。
@@ -28,6 +28,7 @@ title: Tooltip | |||
| arrowPointAtCenter | 箭头是否指向目标元素中心 | boolean | `false` | | | |||
| autoAdjustOverflow | 气泡被遮挡时自动调整位置 | boolean | `true` | | | |||
| defaultVisible | 默认是否显隐 | boolean | false | | | |||
| color | 背景颜色 | string | - | |
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.
嗯...我加下
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.
backgroundColor
会不会好点
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.
跟 Tag 保持一致就用 color
吧!
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.
要不加个判断,如果是纯白,就把字体变黑。
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.
我搜了一下,网上有很多,根据颜色判断是深色还是浅色的,要不要加个这样的判断设置下 color |
感觉有点麻烦,白色的话表达有 |
字体颜色也需要能配置吧 |
字体颜色其实可以先通过 css 变 |
🤔 This is a ...
🔗 Related issue link
Closes #23127
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge
View rendered components/tooltip/demo/colorful.md
View rendered components/tooltip/index.en-US.md
View rendered components/tooltip/index.zh-CN.md