feat(core): Add xs size variant to Radio#118374
Open
jaydgoss wants to merge 1 commit into
Open
Conversation
Add a 12px outer / 6px inner size to the Radio component alongside the existing sm and md variants. The 6px inner keeps the 1:2 inner-to-outer ratio used by the other sizes. Cover the new variant in the snapshot tests and component docs.
Contributor
Story previewsPreview the stories changed in this PR on the Vercel deployment: Preview deployment: https://sentry-e826fy53o.sentry.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Adds an
xssize variant to the coreRadiocomponent with a 12px outer diameter and a 6px inner dot, alongside the existingsm(20px) andmd(24px) sizes.This new variant is going to be used in the context of an updated version of the project creation flow, the design of which calls for a 12px text label next to a radio button with an outer width of 12px. If I were to use existing sm radio button, it would appear out of proportion with the text label.
Details
The new
xsvariant is wired through thesizeprop union andradioConfig. Its 6px inner dot keeps the 1:2 inner-to-outer ratio used by the other sizes. The variant is covered in the snapshot tests across both themes and checked/unchecked states, and documented in the component stories.The auto-generated Code Connect mapping (
radio.figma.tsx) is left unchanged, since itssizeenum maps to Figma component property values that cannot be added from code.