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
feat: ColorPicker implement disabledAlpha
API
#43355
Conversation
Run & review this pull request in StackBlitz Codeflow. |
size-limit report 📦
|
ci 挂了 |
好像是 cssinjs 那个问题搞挂的 |
在看了👌 |
0f80144
to
8f0958a
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feature #43355 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 657 657
Lines 11162 11077 -85
Branches 3029 2998 -31
=========================================
- Hits 11162 11077 -85
☔ View full report in Codecov by Sentry. |
如果用户传了一个带透明度的颜色,会不会帮用户把透明度去掉? |
代码里没做限制,感觉需要做一下限制,因为可能有复合使用的场景,我补充一下。 |
Conflicting |
8f0958a
to
bb1f44f
Compare
处理的时候应该把透明度变为 1,并且给出警告 |
ok 我加一下 |
7f6a40b
to
7382b0f
Compare
7382b0f
to
afbcb28
Compare
Conflicting |
disabledAlpha
API
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
disabledAlpha
prop does not work #43253💡 Background and solution
📝 Changelog
disabledAlpha
APIdisabledAlpha
API☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at 0f80144
Added a new feature to the
ColorPicker
component to allow disabling the alpha channel of the color picker. This feature is controlled by a new propdisabledAlpha
that is passed to theColorPicker
and its subcomponents. Updated the documentation, demo, styles, and tests to reflect this change.🔍 Walkthrough
🤖 Generated by Copilot at 0f80144
disabledAlpha
prop toColorPicker
component and its subcomponents to allow users to disable the alpha channel of the color picker (link, link, link, link, link)disabledAlpha
prop toRcColorPickerPanel
andColorInput
components inPanelPicker
component to disable the alpha slider and input in the panel and the input box (link, link)disabledAlpha
prop from theprops
object inColorPicker
,PanelPicker
, andColorInput
components to use it later (link, link, link)ColorInput
component to hide theColorAlphaInput
component if thedisabledAlpha
prop is true (link)genPickerStyle
function to avoid overlapping and create some space between the sliders and the input box (link, link)disabledAlpha
modifier to adjust the layout of the sliders when the alpha slider is disabled (link)disabledAlpha
prop works as expected in theColorPicker
component (link)ColorPicker
documentation in Chinese and English to describe thedisabledAlpha
prop (link, link, link, link)disabledAlpha
prop from theColorPickerProps
type to avoid passing it to the underlyingRcColorPicker
component, which does not support it (link)