Skip to content

Commit 84da0b1

Browse files
authored
Minor consistency tweaks for documentation
1 parent 4194837 commit 84da0b1

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,42 +33,42 @@ The UMD build is also available on [unpkg](https://unpkg.com):
3333

3434
You can find the library on `window.ReactMedia`.
3535

36-
## Hooks are coming soon !
36+
## Hooks are coming soon!
3737

38-
Hooks are available in 2.X branch
38+
Hooks are available in 2.X branch.
3939

40-
Install react-media@next to get it.
40+
Install `react-media@next` to get it.
4141

42-
useMedia accepts a single options argument to handle both single and multiplie queries, so the same properties as Media are available (except of course render and children props).
42+
`useMedia` accepts a single options argument to handle both single and multiplie queries, so the same properties as Media are available (except of course render and children props).
4343

4444

45-
Simple usage with multiple queries :
45+
Simple usage with multiple queries:
4646

4747
```tsx
48-
import { useMedia } from 'react-media'
48+
import { useMedia } from 'react-media';
4949

5050
const GLOBAL_MEDIA_QUERIES = {
5151
small: "(max-width: 599px)",
5252
medium: "(min-width: 600px) and (max-width: 1199px)",
5353
large: "(min-width: 1200px)"
54-
}
55-
const matches = useMedia({ queries: GLOBAL_MEDIA_QUERIES })
54+
};
55+
const matches = useMedia({ queries: GLOBAL_MEDIA_QUERIES });
5656

57-
const marginBottom = matches.large ? 0 : 10
57+
const marginBottom = matches.large ? 0 : 10;
5858
```
5959

6060
With single query :
6161

6262
```tsx
63-
import { useMedia } from 'react-media'
63+
import { useMedia } from 'react-media';
6464

6565
const GLOBAL_MEDIA_QUERIES = {
6666
small: "(max-width: 599px)",
6767
medium: "(min-width: 600px) and (max-width: 1199px)",
6868
large: "(min-width: 1200px)"
69-
}
69+
};
7070

71-
const isSmallScreen = useMedia({ query: "(max-width: 599px)" })
71+
const isSmallScreen = useMedia({ query: "(max-width: 599px)" });
7272

7373
```
7474

0 commit comments

Comments
 (0)