-
Notifications
You must be signed in to change notification settings - Fork 13.4k
feat(range): add class and expose parts for dual knobs for custom styling #30941
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
base: feature-8.8
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is required otherwise it won't match knob when it has knob knob-a.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the classes assigned to knob-handle from range-knob-a to range-knob-handle-a to match what they are actually applied to.
| configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { | ||
| test.describe(title('range: customization'), () => { | ||
| test('should be customizable', async ({ page }) => { | ||
| await page.goto(`/src/components/range/test/custom`, config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the screenshots here in favor of checking that the styles are applied to the right element when the part is styled.
Issue number: resolves #29862
What is the current behavior?
Range exposes a single part for both knobs & pins. This makes it impossible to style the knobs/pins differently when dual knobs is enabled.
What is the new behavior?
range-dual-knobsto the host element whendualKnobsis enabledknob-handle-a- The container element for the lower/left knob. Only available whendualKnobsistrue.knob-handle-b- The container element for the upper/right knob. Only available whendualKnobsistrue.pin-a- The counter that appears above the lower/left knob. Only available whendualKnobsistrue.pin-b- The counter that appears above the upper/right knob. Only available whendualKnobsistrue.knob-a- The visual knob element for the lower/left knob. Only available whendualKnobsistrue.knob-b- The visual knob element for the upper/right knob. Only available whendualKnobsistrue.pressed- Added to the knob-handle, knob, and pin that is currently being pressed to drag. Only one set has this part at a time.focused- Added to the knob-handle, knob, and pin that currently has focus. Only one set has this part at a time.Does this introduce a breaking change?
Other information