Skip to content

Conversation

thinkasany
Copy link
Member

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature

📝 Change Log

Language Changelog
🇺🇸 English feat: ConfigProvider support classnames and styles for checkbox
🇨🇳 Chinese feat: ConfigProvider support classnames and styles for checkbox

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Contributor

github-actions bot commented Feb 13, 2025

👁 Visual Regression Report for PR #52781 Failed ❌

🎯 Target branch: next (45ba7aa)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎
📊 Summary: 🔄 2 changed

Expected (Branch next) Actual (Current PR) Diff
input-group.compact.png input-group.compact.png input-group.compact.css-var.png input-group.compact.css-var.png
input-otp.compact.png input-otp.compact.png input-otp.compact.css-var.png input-otp.compact.css-var.png

Important

There are 2 diffs found in this PR: 🔄 2 changed.
Please check all items:

  • Visual diff is acceptable

Copy link
Contributor

github-actions bot commented Feb 13, 2025

Preview is ready

Copy link

Walkthrough

This pull request introduces a new feature that allows the ConfigProvider to support custom class names and styles for checkboxes. This enhancement provides developers with more flexibility in styling checkboxes by using the classNames and styles properties.

Changes

Files Summary
components/checkbox/Checkbox.tsx Added support for classNames and styles properties in CheckboxProps and integrated them into the checkbox rendering logic.
components/checkbox/tests/checkbox.test.tsx Added tests to verify the custom styles and class names functionality for checkboxes.
components/checkbox/demo/_semantic.tsx Introduced a demo file to showcase the semantic DOM structure for checkboxes.
components/checkbox/index.en-US.md, components/checkbox/index.zh-CN.md Updated documentation to include information about the new classNames and styles properties.
components/config-provider/context.ts Updated CheckboxConfig type to include classNames and styles.
components/config-provider/index.en-US.md, components/config-provider/index.zh-CN.md Updated documentation to reflect changes in CheckboxConfig.
components/config-provider/index.tsx Updated the checkbox configuration to use the new CheckboxConfig type.

Copy link
Contributor

github-actions bot commented Feb 13, 2025

size-limit report 📦

Path Size
dist/antd.min.js 503.16 KB (+78 B 🔺)
dist/antd-with-locales.min.js 572.15 KB (+70 B 🔺)

Copy link

pkg-pr-new bot commented Feb 13, 2025

Copy link

codecov bot commented Feb 13, 2025

Bundle Report

Changes will increase total bundle size by 1.75kB (0.05%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.75MB 1.75kB (0.05%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.min.js 874 bytes 2.03MB 0.04%
antd.min.js 874 bytes 1.72MB 0.05%

Files in antd-with-locales.min.js:

  • ./components/config-provider/context.ts → Total Size: 1.51kB

Files in antd.min.js:

  • ./components/config-provider/context.ts → Total Size: 1.51kB

Copy link

cloudflare-workers-and-pages bot commented Feb 13, 2025

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: c68ba05
Status: ✅  Deploy successful!
Preview URL: https://6da00a66.ant-design.pages.dev
Branch Preview URL: https://cp-checkbox.ant-design.pages.dev

View logs

@thinkasany thinkasany requested a review from zombieJ February 13, 2025 07:10
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (da595e6) to head (c68ba05).
Report is 17 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #52781   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          765       765           
  Lines        13785     13789    +4     
  Branches      3610      3611    +1     
=========================================
+ Hits         13785     13789    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zombieJ zombieJ merged commit bbb3810 into next Feb 14, 2025
42 checks passed
@zombieJ zombieJ deleted the cp-checkbox branch February 14, 2025 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants