-
Notifications
You must be signed in to change notification settings - Fork 81
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
feat: InputGroup component #2383
Conversation
|
||
import { InputGroup } from './InputGroup' | ||
|
||
describe('InputGroup component', () => { |
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.
Maybe add a test for checking that the right className is applied?
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.
also one with the error state
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.
Good catch! I was just thinking the tests could probably be more thorough. 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.
@jcbcapps sorry, I shoulda been more clear. Can you add a test that verifies that the component has the default class name applied? (usa-input-group
)
It can go in the renders without errors
test, imo, since it's jsut verifying that the component built with the right uswds class
Love it! The more we create components for these classes, the more reacty and intuitive our library becomes to use! I might be preemptively commenting things since I saw another commit come in for something I was gonna mention. So far so good! I'll wait on the CI pipeline before approving! |
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.
One final thing, added a comment to thread about tests
|
||
import { InputGroup } from './InputGroup' | ||
|
||
describe('InputGroup component', () => { |
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.
@jcbcapps sorry, I shoulda been more clear. Can you add a test that verifies that the component has the default class name applied? (usa-input-group
)
It can go in the renders without errors
test, imo, since it's jsut verifying that the component built with the right uswds class
Summary
Related Issues or PRs
Resolves #1692
How To Test
Check unit tests
I did not add a Storybook component for this, but rather updated the
InputPrefix
andInputSuffix
components to useInputGroup
instead of adiv
. Happy to come back and add a Storybook component, but wasn't sure how to approach that in this context. Let me know if I need to make that change!Screenshots (optional)