Skip to content

Conversation

francinelucca
Copy link
Member

@francinelucca francinelucca commented Oct 3, 2025

This pull request adds support for applying custom styles via a new style prop to the FormControl component and its subcomponents in @primer/react. This enhancement allows users to directly pass inline styles, increasing flexibility and customization options when using these components.

Changelog

New

  • style prop in FormControl, FormControl.Caption, FormControl.Validation, FormControl.LeadingVisual, FormControl.Label and InputValidaton

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Copy link

changeset-bot bot commented Oct 3, 2025

🦋 Changeset detected

Latest commit: c26b773

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@primer/react Minor
@primer/styled-react Major

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

@github-actions github-actions bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 3, 2025
Copy link
Contributor

github-actions bot commented Oct 3, 2025

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@github-actions github-actions bot requested a deployment to storybook-preview-6937 October 3, 2025 00:26 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6937 October 3, 2025 00:34 Inactive
@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 3, 2025
@francinelucca francinelucca changed the title chore: add styles to formcontrol subcomponents chore: add styles to FormControl and subcomponents Oct 3, 2025
@github-actions github-actions bot requested a deployment to storybook-preview-6937 October 3, 2025 01:12 Abandoned
@primer-integration
Copy link

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/3768

@primer-integration
Copy link

🟢 ci completed with status success.

@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: failing Changes in this PR cause breaking changes in gh/gh labels Oct 3, 2025
@francinelucca francinelucca marked this pull request as ready for review October 3, 2025 03:07
@francinelucca francinelucca requested a review from a team as a code owner October 3, 2025 03:07
@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Oct 3, 2025
Copy link
Contributor

github-actions bot commented Oct 3, 2025

👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks!

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for custom inline styles via a new style prop to the FormControl component and its subcomponents in @primer/react. This enhancement provides users with additional flexibility for customization when using these form components.

  • Adds style?: React.CSSProperties prop to FormControl and all its subcomponents
  • Updates component interfaces and implementations to accept and apply the style prop
  • Includes changeset documentation for the minor version release

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/react/src/internal/components/InputValidation.tsx Adds style prop to Props interface and applies it to the Text component
packages/react/src/FormControl/_FormControlValidation.tsx Adds style prop to FormControlValidationProps and passes it to InputValidation
packages/react/src/FormControl/FormControlLeadingVisual.tsx Adds style prop to component props and applies it to the div element
packages/react/src/FormControl/FormControlLabel.tsx Adds style prop to Props interface
packages/react/src/FormControl/FormControlCaption.tsx Adds style prop to FormControlCaptionProps and applies it to the Text component
packages/react/src/FormControl/FormControl.tsx Adds style prop to FormControlProps and applies it to both layout div elements
.changeset/sweet-owls-do.md Documents the changes for the minor version release

@github-actions github-actions bot added integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 3, 2025
Copy link
Contributor

github-actions bot commented Oct 3, 2025

👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks!

@TylerJDev TylerJDev merged commit 09ee0ea into main Oct 3, 2025
40 of 41 checks passed
@TylerJDev TylerJDev deleted the chore/add-styles-to-formcontrol-subcomponents branch October 3, 2025 14:30
@primer primer bot mentioned this pull request Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants