Skip to content

Commit

Permalink
✏️ Small corrections to README
Browse files Browse the repository at this point in the history
  • Loading branch information
beefchimi committed Jul 27, 2019
1 parent 528bf2d commit a59a07b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ export function jestMockMatchMedia({media, matches = false}: MockMatchMedia) {

```jsx
const mediaQueries = {
prefersReducedMotion: '(prefers-reduced-motion: reduce)',
mobile: '(max-width: 767px)',
prefersReducedMotion: '(prefers-reduced-motion: reduce)',
};

describe('<MyComponent />', () => {
Expand Down Expand Up @@ -127,9 +127,8 @@ interface Props {
export const MediaQueryContext = createContext(null);

const mediaQueries = {
prefersReducedMotion: '(prefers-reduced-motion: reduce)',
mobile: '(max-width: 767px)',
desktop: '(min-width: 768px)',
prefersReducedMotion: '(prefers-reduced-motion: reduce)',
};

export default function MediaQueryProvider({children}: Props) {
Expand Down Expand Up @@ -157,13 +156,14 @@ export function useMediaQueryContext() {
```jsx
import React from 'react';
import MediaQueryProvider from '../MediaQueryProvider';
import MyComponent from '../MyComponent';

export default function App() {
return (
<MediaQueryProvider>
<MyApp>
<div id="MyApp">
<MyComponent />
</MyApp>
</div>
</MediaQueryProvider>
);
}
Expand Down

0 comments on commit a59a07b

Please sign in to comment.