-
Notifications
You must be signed in to change notification settings - Fork 535
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
Input field components - text, checkbox, radio #1611
Conversation
🦋 Changeset detectedLatest commit: ad9e954 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Note: I intentionally excluded this animation for the ChoiceFieldset because it has nowhere to animate in from
docs/content/ChoiceInputField.mdx
Outdated
|
||
<!-- | ||
TODO: add `validationStatus` examples when we have the validation styling done | ||
--> |
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.
Do we need this? ☝️
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.
I guess we could get rid of it
import {ChoiceInputField, Checkbox, Radio} from '@primer/react' | ||
import {MarkGithubIcon} from '@primer/octicons-react' | ||
import {ComponentChecklist} from '../src/component-checklist' | ||
import {PropsTable} from '../src/props-table' |
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.
Some of these imports may not be needed anymore
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.
I'll see what I can get rid of. When I excluded the PropsTable
import, it caused a deployment error in Vercel.
Co-authored-by: Rez <rezrah@github.com>
) | ||
const results = await axe(container) | ||
expect(results).toHaveNoViolations() | ||
cleanup() |
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.
Might be worth running cleanup
and jest.clearAllMocks();
on an afterEach
block at the top of the test suite, as you're using spy a fair bit here
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.
💥 nice one @mperrotti
This component renders input along with its label, validation content, and hint content. It will correctly associate labels and other related content with the input.
Screenshots
Value input
Toggle (radio/checkbox) input
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.
Closes Primer issue #480