Skip to content

Comments

feat: ConfigProvider support classNames and styles for slider#52185

Merged
zombieJ merged 2 commits intoant-design:featurefrom
thinkasany-forks:cp-slider
Jan 2, 2025
Merged

feat: ConfigProvider support classNames and styles for slider#52185
zombieJ merged 2 commits intoant-design:featurefrom
thinkasany-forks:cp-slider

Conversation

@thinkasany
Copy link
Member

@thinkasany thinkasany commented Dec 31, 2024

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature

🔗 Related Issues

  • Describe the source of related requirements, such as links to relevant issue discussions.
  • For example: close #xxxx, fix #xxxx

💡 Background and Solution

  • The specific problem to be addressed.
  • List the final API implementation and usage if needed.
  • If there are UI/interaction changes, consider providing screenshots or GIFs.

📝 Change Log

Language Changelog
🇺🇸 English feat: ConfigProvider support classNames and styles for slider
🇨🇳 Chinese feat: ConfigProvider 支持 slider 组件配置 classNames 和 styles

@bolt-new-by-stackblitz
Copy link

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 31, 2024

👁 Visual Regression Report for PR #52185 Failed ❌

🎯 Target branch: feature (0745996)
📖 View Full Report ↗︎

Expected (Branch feature) Actual (Current PR) Diff
button-color-variant.dark.png button-color-variant.dark.png button-color-variant.dark.css-var.png button-color-variant.dark.css-var.png
button-debug-color-variant.compact.png button-debug-color-variant.compact.png button-debug-color-variant.compact.css-var.png button-debug-color-variant.compact.css-var.png
button-debug-color-variant.dark.png button-debug-color-variant.dark.png button-debug-color-variant.dark.css-var.png button-debug-color-variant.dark.css-var.png
button-debug-color-variant.default.png button-debug-color-variant.default.png button-debug-color-variant.default.css-var.png button-debug-color-variant.default.css-var.png
checkbox-custom-line-width.compact.png checkbox-custom-line-width.compact.png checkbox-custom-line-width.compact.css-var.png checkbox-custom-line-width.compact.css-var.png
checkbox-custom-line-width.dark.png checkbox-custom-line-width.dark.png checkbox-custom-line-width.dark.css-var.png checkbox-custom-line-width.dark.css-var.png
checkbox-custom-line-width.default.png checkbox-custom-line-width.default.png checkbox-custom-line-width.default.css-var.png checkbox-custom-line-width.default.css-var.png
checkbox-debug-line.compact.png checkbox-debug-line.compact.png checkbox-debug-line.compact.css-var.png checkbox-debug-line.compact.css-var.png

Warning

There are more diffs not shown in the table. Please check the Full Report for details.


Important

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

  • Checked all diffs in the full report
  • Visual diff is acceptable

@github-actions
Copy link
Contributor

github-actions bot commented Dec 31, 2024

Preview is ready

@petercat-assistant
Copy link

Walkthrough

This pull request introduces a new feature to the Slider component, allowing custom styles and class names to be applied. It updates the configuration to include SliderConfig and modifies the documentation to reflect these changes. Additionally, it adds tests to ensure the correct application of custom styles and class names.

Changes

Files Summary
components/config-provider/context.ts Added SliderConfig type and updated slider configuration to use it.
components/config-provider/index.en-US.md, components/config-provider/index.zh-CN.md Updated documentation to include new classNames and styles properties for the Slider component.
components/slider/tests/index.test.tsx Added tests to verify custom styles and class names for the Slider component.
components/slider/demo/_semantic.tsx Updated semantic descriptions to include root element.
components/slider/index.tsx Extended SliderProps to include classNames and styles, and updated rendering logic to apply these properties.

@thinkasany thinkasany changed the title feat feat: ConfigProvider support classNames and styles for slider Dec 31, 2024
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 31, 2024

Open in Stackblitz

More templates

npm i https://pkg.pr.new/ant-design/ant-design/antd@52185

commit: fbe8e13

@codecov
Copy link

codecov bot commented Dec 31, 2024

Bundle Report

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

Detailed changes
Bundle name Size Change
antd.min-array-push 3.38MB 2.5kB (0.07%) ⬆️

@thinkasany thinkasany mentioned this pull request Dec 31, 2024
@codecov
Copy link

codecov bot commented Dec 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (0745996) to head (fbe8e13).
Report is 1 commits behind head on feature.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #52185   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          763       763           
  Lines        13744     13748    +4     
  Branches      3590      3592    +2     
=========================================
+ Hits         13744     13748    +4     

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

@zombieJ zombieJ merged commit aa1b6a9 into ant-design:feature Jan 2, 2025
37 checks passed
@zombieJ zombieJ mentioned this pull request Jan 6, 2025
16 tasks
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