-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rename OptionallyVisuallyHiddenContainer to OptionalVisuall…
…yHiddenWrapper to match naming to CSSWrapper and make more grammatical sense
- Loading branch information
Showing
7 changed files
with
39 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
lib/src/utilities/optional-visually-hidden-wrapper/OptionalVisuallyHiddenWrapper.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { render } from '@testing-library/react' | ||
import * as React from 'react' | ||
|
||
import { OptionalVisuallyHiddenWrapper } from '.' | ||
|
||
const OptionalVisuallyHiddenWrapperImplementation = (props) => { | ||
return ( | ||
<OptionalVisuallyHiddenWrapper {...props}> | ||
<p>hello</p> | ||
</OptionalVisuallyHiddenWrapper> | ||
) | ||
} | ||
|
||
describe('OptionalVisuallyHidden component', () => { | ||
it('renders hidden content', async () => { | ||
const { container } = render( | ||
<OptionalVisuallyHiddenWrapperImplementation hidden /> | ||
) | ||
|
||
expect(container).toMatchSnapshot() | ||
}) | ||
|
||
it('renders visible content', async () => { | ||
const { container } = render( | ||
<OptionalVisuallyHiddenWrapperImplementation /> | ||
) | ||
|
||
expect(container).toMatchSnapshot() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { OptionalVisuallyHiddenWrapper } from './OptionalVisuallyHiddenWrapper' |
26 changes: 0 additions & 26 deletions
26
...utilities/optionally-visually-hidden-container/OptionallyVisuallyHiddenContainer.test.tsx
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
lib/src/utilities/optionally-visually-hidden-container/index.ts
This file was deleted.
Oops, something went wrong.