Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 11, 2025

This PR migrates packages/react/src/Portal/Portal.stories.tsx away from styled-components as part of our effort to remove references and usage of the library in Storybook stories.

Changes Made

  • Removed Box component dependency: Replaced <Box bg="red.2" p={3}> and <Box bg="green.2" p={3}> with standard <div> elements
  • Created CSS module: Added Portal.stories.module.css with properly scoped styles using Primer design tokens
  • Updated color variables: Used --bgColor-danger-muted and --bgColor-success-muted instead of the deprecated --base-color-red-2 and --base-color-green-2 tokens to comply with Primer color guidelines
  • Maintained visual consistency: The story continues to display the same red and green container layout as before

The Portal story now uses CSS modules for styling instead of styled-components, while preserving the exact same visual appearance and functionality.

Screenshot

Portal Story with CSS Modules

The story shows the proper red outer container and green inner container, with the portal content being rendered at the BaseStyles root as expected.

Fixes #6579.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link

changeset-bot bot commented Aug 11, 2025

⚠️ No Changeset found

Latest commit: cf95ac7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Copilot Copilot AI changed the title [WIP] Update Portal.stories.tsx to no longer use styled-components Update Portal.stories.tsx to no longer use styled-components Aug 11, 2025
@Copilot Copilot AI requested a review from hectahertz August 11, 2025 17:06
Copilot finished work on behalf of hectahertz August 11, 2025 17:06
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.

Update Portal.stories.tsx to no longer use styled-components
2 participants