Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Larícia Mota <laricia.mota@vtex.com.br>
  • Loading branch information
igorbrasileiro and lariciamota authored Sep 17, 2021
1 parent 575d0ba commit a570d36
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/store-ui/src/molecules/Modal/Modal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const TestModal = () => {
}

describe('Modal', () => {
it('Test data-store-modal', () => {
it('The attribute data-store-modal should be present', () => {
const { getByTestId } = render(
<Modal aria-label="test modal" testId="store-modal" isOpen>
Foo
Expand Down Expand Up @@ -117,7 +117,7 @@ describe('Modal', () => {

fireEvent.click(getByTestId('trigger'))

// Press any key different from 'Escape' won't close the modal
// Pressing any key other than 'Escape' won't close the modal
fireEvent.keyPress(getByTestId('store-modal'), { key: 'j' })
expect(getByTestId('store-modal')).toBeInTheDocument()

Expand Down
2 changes: 1 addition & 1 deletion packages/store-ui/src/molecules/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const ModalContent = ({ children, ...props }: ModalContentProps) => {
{/*
* This next line is disabled due to the onClick prop.
* Even though div isn't clickable, the onClick is required to prevent the event bubbles
* until the overlay that calls onDismiss inside the onClick handler.
* until the overlay, which calls onDismiss inside the onClick handler, is clicked.
*/}
{/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */}
<div
Expand Down
2 changes: 1 addition & 1 deletion packages/store-ui/src/molecules/Modal/useTrapFocus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface TrapFocusParams {

/**
* Element that will maintain the focus inside, focus the first element,
* and focus back the element that was focus when useTrapFocus is triggered.
* and focus back on the element that was in focus when useTrapFocus was triggered.
*
* Inspired by Material UI TrapFocus https://github.com/mui-org/material-ui/blob/master/packages/mui-core/src/Unstable_TrapFocus/Unstable_TrapFocus.js
*/
Expand Down

0 comments on commit a570d36

Please sign in to comment.