-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
type: add deprecated info for overlayClassName #486
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough本次变更主要涉及 Changes
Possibly related PRs
Suggested reviewers
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
src/Tooltip.tsxOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /.eslintrc.js
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #486 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 26 26
Branches 10 10
=========================================
Hits 26 26 ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
README.md (1)
86-86
: API 文档更新完善废弃提示信息明确,新的
classNames
属性文档完整,类型定义准确。建议补充一个简单的迁移示例。建议添加如下迁移示例:
- <Tooltip overlayClassName="custom-tooltip"> + <Tooltip classNames={{ root: 'custom-tooltip' }}>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
README.md
(1 hunks)src/Tooltip.tsx
(1 hunks)
🔇 Additional comments (2)
src/Tooltip.tsx (2)
38-39
: 属性废弃标记正确添加
废弃提示信息清晰地指出了替代方案,这与 README.md 中的文档保持一致。
Line range hint 103-103
: 类名合并处理得当
在 Trigger 组件中使用 classNames
模块正确地合并了废弃的 overlayClassName
和新的 classNames.root
,确保了向后兼容性。
Summary by CodeRabbit
新功能
styles
属性,允许在rc-tooltip
组件中应用语义化的 DOM 样式。文档
README.md
中的 API 文档,标记overlayClassName
属性为弃用,建议使用classNames={{ root: {} }}
。classNames
属性的文档说明。