Skip to content

fix(ButtonV2): button corner when used as Link. PLAT-1438#1363

Merged
Douglasgomes027 merged 1 commit intomainfrom
PLAT-1438-button-corners-look-inconsistent-when-button-v-2-is-used-as-a-link
Feb 20, 2026
Merged

fix(ButtonV2): button corner when used as Link. PLAT-1438#1363
Douglasgomes027 merged 1 commit intomainfrom
PLAT-1438-button-corners-look-inconsistent-when-button-v-2-is-used-as-a-link

Conversation

@Douglasgomes027
Copy link
Contributor

@Douglasgomes027 Douglasgomes027 commented Jan 27, 2026

Fixes an inconsistency where ButtonV2 loses its expected corner radius when rendered as a Link component via as={Link}, making it look different from the regular button and from as="a" usage.

When ButtonV2 is used as a navigation button (e.g., as={Link}), the rendered element can inherit/override styles from the Link component and end up with an incorrect border-radius (e.g., appearing as 4px instead of the design system’s button radius). This causes visual inconsistency across the UI and in Storybook.

Solution

  • Enforced the design system border radius at the Button root level:
    • border-radius: var(--sscds-radii-button) !important;
  • Added a new Storybook story AsLinkComponent to document and compare:
    • ButtonV2 as={Link}
    • ButtonV2 as="a"
    • Regular Link
    • Regular ButtonV2
  • Updated/added visual regression snapshot coverage for this case.

This is a design-system correctness fix: regardless of which underlying element ButtonV2 renders (button, a, or Link), it should keep the same core button styling, including corner radius.

@Douglasgomes027 Douglasgomes027 requested a review from a team as a code owner January 27, 2026 12:20
@Douglasgomes027 Douglasgomes027 changed the title fix(ButtonV2): button corner when used as Link fix(ButtonV2): button corner when used as Link. PLAT-1438 Jan 27, 2026
@Douglasgomes027 Douglasgomes027 force-pushed the PLAT-1438-button-corners-look-inconsistent-when-button-v-2-is-used-as-a-link branch from d1f1dd9 to 85e9ff0 Compare January 27, 2026 15:31
@wiz-e35d4661bf
Copy link

wiz-e35d4661bf bot commented Jan 27, 2026

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total -

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

@Douglasgomes027 Douglasgomes027 force-pushed the PLAT-1438-button-corners-look-inconsistent-when-button-v-2-is-used-as-a-link branch 3 times, most recently from 384c1a1 to b2ee30a Compare January 28, 2026 14:45
@Douglasgomes027 Douglasgomes027 force-pushed the PLAT-1438-button-corners-look-inconsistent-when-button-v-2-is-used-as-a-link branch from b2ee30a to 48e32ee Compare February 20, 2026 21:46
@github-actions
Copy link

🚀 Snapshot Build Published

A snapshot version has been published to GitHub Packages for testing:

Snapshot Version: 2.41.2-snapshot-4e0a9c2e
Current Version: 2.41.2 (from registry/git tags)
Tag: pr-1363

You can install this version in your project using (with .npmrc configured for @securityscorecard:registry=https://npm.pkg.github.com and auth):

yarn add @securityscorecard/design-system@pr-1363

Published to GitHub Packages; snapshot versions are not unpublished when the PR is closed.

@Douglasgomes027 Douglasgomes027 merged commit fa4f426 into main Feb 20, 2026
36 checks passed
@Douglasgomes027 Douglasgomes027 deleted the PLAT-1438-button-corners-look-inconsistent-when-button-v-2-is-used-as-a-link branch February 20, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants