feat: support classNames and styles#717
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough本次更改为 Changes
Sequence Diagram(s)sequenceDiagram
participant App
participant InputNumber
participant SemanticContext
participant InternalInputNumber
participant StepHandler
App->>InputNumber: 传递 classNames, styles
InputNumber->>SemanticContext: Provider(classNames, styles)
InputNumber->>InternalInputNumber: 渲染
InternalInputNumber->>SemanticContext: useContext 获取 classNames, styles
InternalInputNumber->>StepHandler: 渲染
StepHandler->>SemanticContext: useContext 获取 classNames, styles
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
tests/semantic.test.tsxOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-react". (The package "eslint-plugin-react" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: The plugin "eslint-plugin-react" was referenced from the config file in ".eslintrc.js » /node_modules/.pnpm/@umijs+fabric@4.0.1_jest@29.7.0_@types+node@22.15.3_ts-node@10.9.2_@types+node@22.15.3_typescript@5.8.3___postcss@8.5.3/node_modules/@umijs/fabric/dist/eslint.js". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
✨ 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 (
|
src/InputNumber.tsx
Outdated
| return decimal.isInvalidate() ? null : decimal; | ||
| }; | ||
|
|
||
| type SemanticName = 'handle' | 'input'; |
| ...inputProps | ||
| } = props; | ||
|
|
||
| const { classNames, styles } = React.useContext(SemanticContext) || {}; |
There was a problem hiding this comment.
这边不对,InputNumber 已经是顶层了,没有需要从 context 拿的东西
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #717 +/- ##
==========================================
+ Coverage 95.95% 96.02% +0.06%
==========================================
Files 6 7 +1
Lines 297 302 +5
Branches 78 79 +1
==========================================
+ Hits 285 290 +5
Misses 12 12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary by CodeRabbit