Skip to content
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

FormControl follow-ups #1850

Merged
merged 15 commits into from
Feb 9, 2022
Merged

FormControl follow-ups #1850

merged 15 commits into from
Feb 9, 2022

Conversation

mperrotti
Copy link
Contributor

Closes # (type the issue number after # if applicable; otherwise remove this line)

Screenshots

Please provide before/after screenshots for any visual changes

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@mperrotti mperrotti requested review from a team and koddsson February 9, 2022 16:42
@changeset-bot
Copy link

changeset-bot bot commented Feb 9, 2022

🦋 Changeset detected

Latest commit: 319e5ff

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

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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
Copy link
Contributor

github-actions bot commented Feb 9, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 62.63 KB (+0.21% 🔺)
dist/browser.umd.js 63.01 KB (+0.21% 🔺)

docs/content/FormControl.mdx Outdated Show resolved Hide resolved
.changeset/silly-humans-float.md Outdated Show resolved Hide resolved
Co-authored-by: Cole Bemis <colebemis@github.com>

export interface FormControlContext extends Pick<FormControlProps, 'disabled' | 'id' | 'required'> {
captionId: string
validationMessageId: string
}

const FormControl = ({children, disabled, id: idProp, required}: FormControlProps) => {
const FormControl = ({children, disabled, id: idProp, required, sx}: FormControlProps) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

FormControl.Label, FormControl.Validation, and FormControl.Caption, FormControl.LeadingVisual should also accept the sx prop

Pick a branch
</Text>
<FormControl>
<FormControl.Label>Pick a branch</FormControl.Label>
Copy link
Contributor

Choose a reason for hiding this comment

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

Clean ✨

Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

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

Love it 💖

@mperrotti mperrotti merged commit fad43d6 into main Feb 9, 2022
@mperrotti mperrotti deleted the mp/fix-form-control-docs branch February 9, 2022 22:00
@primer-css primer-css mentioned this pull request Feb 9, 2022
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.

2 participants