Skip to content
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

Segmented control: Support disabled prop #621

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

kendallstrautman
Copy link
Contributor

@kendallstrautman kendallstrautman commented Oct 29, 2024

Description

Extend SegmentedControl to support disabled functionality and style. In this implementation both classic and surface variants share the same disabled styles. See design spec and context for request.

Screenshot 2024-10-29 at 2 08 23 PM Screenshot 2024-10-29 at 2 08 28 PM

Testing steps

Visit the sink page in the playground to see the disabled control.

Relates issues / PRs

Copy link

vercel bot commented Oct 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
themes-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2024 9:10pm

@kendallstrautman kendallstrautman marked this pull request as ready for review October 29, 2024 21:12
@@ -20,6 +20,12 @@

/* Create a new stacking context */
isolation: isolate;

&.disabled {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use :where or is the added specificity useful here?

Suggested change
&.disabled {
&:where(.disabled) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The specificity is needed here to override the color and background-color on the base class.

@kendallstrautman kendallstrautman merged commit fb7e2da into main Nov 1, 2024
2 checks passed
@kendallstrautman kendallstrautman deleted the ks.add-segmented-control-disabled branch November 1, 2024 18:44
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