fix(Tabs,RadioGroup): align radio/tabs size mapping#1110
Merged
Conversation
- RADIO_SIZE_MAP: medium -> small (28px), large -> medium (32px) - Radio.tsx tabs default size: large instead of small - Radio.tsx tabs mapping: medium -> small, large -> medium - Updated JSDoc comments and docs Co-authored-by: Andrey Yamanov <tenphi@gmail.com>
- RADIO_SIZE_MAP: medium -> xsmall (24px button, 32px total), large -> medium (32px button, 40px total) - Radio.tsx tabs default: large (was small) - Radio.tsx tabs mapping: medium -> xsmall, large -> medium - Simplified stories to show only large/medium sizes - Updated docs and JSDoc comments Co-authored-by: Andrey Yamanov <tenphi@gmail.com>
🦋 Changeset detectedLatest commit: 43d586a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📦 NPM canary releaseDeployed canary version 0.0.0-canary-60792f3. |
Contributor
🧪 Storybook is successfully deployed!
|
Contributor
🏋️ Size limit report
Click here if you want to find out what is changed in this build |
Co-authored-by: Andrey Yamanov <tenphi@gmail.com>
TabButton fell back to 'medium' regardless of type, producing 32px tabs vs 40px from Radio.Tabs. Use the same conditional default. Made-with: Cursor
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
…IO_SIZE_MAP consistently Both components now default to 'medium' and use the shared RADIO_SIZE_MAP for size remapping, eliminating divergent fallback behavior for unsupported sizes. Made-with: Cursor
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.

Describe changes
Aligns size handling between
Tabs type="radio"andRadio.Tabsso both use the same two API sizes with identical Item button mappings:large(default)medium(32px)mediumxsmall(24px)Changes:
Radio.tsx— Changed default size for tabs mode from'small'to'large'; updated size mapping tomedium → xsmall,large → medium(matchingRADIO_SIZE_MAP).types.ts— Updated JSDoc comments onRADIO_SIZE_MAP,TabStyleProps.size, andCubeTabsProps.sizeto document the correct mapping.Tabs.stories.tsx— AddedRadioTypeSizesstory showing bothlargeandmediumradio sizes.RadioGroup.stories.tsx— SimplifiedTabsGroupSizesstory to only showlargeandmediumsizes.Tabs.docs.mdx— Updated size documentation note.Checklist
Closes: N/A
Other information
The
RADIO_SIZE_MAPvalues (medium → xsmall,large → medium) were already correct in the original code. The key fix is inRadio.tsxwhere the tabs-mode default size was'small'instead of'large', and the mapping now matchesTabs type="radio"exactly.