-
Notifications
You must be signed in to change notification settings - Fork 638
chore: add styles to FormControl and subcomponents #6937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: c26b773 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
👋 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! |
…b.com:primer/react into chore/add-styles-to-formcontrol-subcomponents
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/3768 |
🟢 ci completed with status |
👋 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! |
There was a problem hiding this 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 |
…to-formcontrol-subcomponents
👋 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! |
This pull request adds support for applying custom styles via a new
style
prop to theFormControl
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 InputValidatonRollout strategy
Testing & Reviewing
Merge checklist