-
-
Notifications
You must be signed in to change notification settings - Fork 253
feat: support classNames and styles for menu #775
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
Conversation
Walkthrough此次更改为 Menu 组件及其子组件(如 SubMenu、MenuItemGroup)引入了通过 Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Menu
participant MenuContextProvider
participant SubMenu/MenuItemGroup
User->>Menu: 传入 classNames/styles 属性
Menu->>MenuContextProvider: 通过 context 传递 classNames/styles
MenuContextProvider->>SubMenu/MenuItemGroup: 子组件消费 context 获取自定义样式
SubMenu/MenuItemGroup-->>User: 渲染带有自定义样式的 DOM
Possibly related PRs
Suggested reviewers
Poem
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
docs/examples/menuItemGroup.tsxOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /.eslintrc.js
src/Menu.tsxOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /.eslintrc.js
tests/SubMenu.spec.tsxOops! Something went wrong! :( ESLint: 8.57.1 Error: Cannot read config file: /.eslintrc.js
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code Graph Analysis (2)docs/examples/menuItemGroup.tsx (2)
src/Menu.tsx (1)
🔇 Additional comments (10)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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 #775 +/- ##
=======================================
Coverage 99.72% 99.72%
=======================================
Files 27 27
Lines 734 734
Branches 198 198
=======================================
Hits 732 732
Misses 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary by CodeRabbit
新功能
测试